/* Minimalist Whiteboard Styles - Version 1.0.2 */

.excalidraw-board-container {
    width: 100%;
    padding: 15px 0; /* Vertical padding for the container */
    box-sizing: border-box;
}

.whiteboard-frame-new {
    background-color: #f0f0f0; /* Light grey for the frame */
    border: 1px solid #cccccc; /* Slightly darker border for definition */
    padding: 10px; /* Padding for the frame */
    border-radius: 6px; /* Subtle rounded corners */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Soft shadow */
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.whiteboard-surface-new {
    background-color: #ffffff; /* Pure white drawing surface */
    border: 1px solid #e0e0e0; /* Very light border for the surface */
    border-radius: 4px; /* Slightly rounded inner corners */
    overflow: hidden; /* Important for Excalidraw */
    width: 100%;
    box-sizing: border-box;
    flex-grow: 1; /* Allows surface to expand if frame has min-height */
}

/* Excalidraw wrapper has inline height: 600px; width: 100%; */
.excalidraw-wrapper {
    display: block;
    line-height: 0; /* Prevents potential extra spacing */
}

/* Ensure Excalidraw's own canvas/div fits perfectly */
.excalidraw-wrapper > .excalidraw { /* Targeting Excalidraw's main class */
    border-radius: 0 !important; /* Remove Excalidraw's own border-radius */
    border: none !important; /* Remove Excalidraw's own border */
}

.whiteboard-pen-tray-new {
    background-color: #e9e9e9; /* Light silver/grey for the pen tray */
    border: 1px solid #d0d0d0;
    height: 25px;
    margin-top: 8px; /* Space above the pen tray */
    border-radius: 4px; /* Rounded corners for the tray */
    width: 70%; /* Make it noticeably shorter than the frame */
    max-width: 400px; /* Max width for very wide screens */
    align-self: center; /* Center the pen tray */
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); /* Subtle inner shadow */
}

/* Custom Toolbar and Status Messages */
#excalidraw-custom-toolbar {
    margin-bottom: 10px;
    padding: 5px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden; /* To contain floated elements */
}

/* Style for general buttons in the toolbar, excluding the delete button by ID */
#excalidraw-custom-toolbar button:not(#egh-delete-btn) {
    margin-right: 8px;
    padding: 6px 12px; /* Keeping existing padding as size is good */
    border: 1px solid #800080; /* Purple border */
    background-color: #800080; /* Purple background */
    color: white;
    border-radius: 3px; /* Keeping existing border-radius */
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease; /* Added border-color transition */
}

#excalidraw-custom-toolbar button:hover {
    background-color: #6a006a; /* Darker Purple */
    border-color: #6a006a;
    color: white;
}

/* Hover state for general toolbar buttons, excluding delete */
#excalidraw-custom-toolbar button:not(#egh-delete-btn):hover {
    background-color: #6a006a; /* Darker Purple */
    border-color: #6a006a;
    color: white;
}

/* Disabled state for general toolbar buttons, excluding delete */
#excalidraw-custom-toolbar button:not(#egh-delete-btn):disabled {
    background-color: #800080; /* Keep purple when disabled */
    border-color: #800080;
    color: white;
    opacity: 0.5;
    cursor: not-allowed;
}

/* #excalidraw-status-messages styles removed */

/* Toast Notification Styles */
.egh-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2000; /* Ensure it's above other elements */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateY(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 250px;
    max-width: 400px;
}

.egh-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.egh-toast-success {
    background-color: #4CAF50; /* Green */
    color: white;
}

.egh-toast-error {
    background-color: #f44336; /* Red */
    color: white;
}

.egh-toast-close-btn {
    background: none;
    border: none;
    color: inherit; /* Inherits color from parent (white for success/error) */
    font-size: 20px;
    font-weight: bold;
    margin-left: 15px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.egh-toast-close-btn:hover {
    opacity: 0.7;
}


/* Modal Styles */
.egh-modal {
    display: none; 
    position: fixed; 
    z-index: 1000; /* High z-index */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); /* Dim background */
}

.egh-modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* Centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px; /* Max width for modals */
    border-radius: 6px;
    position: relative;
}

.egh-modal-close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.egh-modal-close-btn:hover,
.egh-modal-close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#egh-whiteboard-list ul {
    list-style-type: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    margin-bottom: 15px;
}

#egh-whiteboard-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

#egh-whiteboard-list li:last-child {
    border-bottom: none;
}

#egh-whiteboard-list li:hover {
    background-color: #f0f0f0;
}

.egh-button-purple {
    background-color: #6a0dad !important; /* Purple */
    color: white !important;
    border: none;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.egh-button-purple:hover {
    background-color: #500884 !important;
}

#egh-copy-share-link-btn {
    padding: 8px 12px;
    /* background-color: #800080; Purple background - already covered by general rule */
    /* color: white; - already covered */
    border: 1px solid #800080; /* Purple border, ensure it's explicitly purple */
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
#egh-copy-share-link-btn:hover {
    background-color: #6a006a; /* Darker Purple */
    border-color: #6a006a;
    color: white;
}

#egh-delete-btn {
    /* Styles for delete button (red) are set in JS and here */
    background-color: #f44336; /* Reddish color from JS, ensure CSS matches or enhances */
    color: white;
    border: 1px solid #d32f2f; /* Darker red border */
    padding: 6px 12px; /* Ensure same padding as other toolbar buttons */
    margin-right: 0; /* It's floated right, so no right margin needed from general rule */
    border-radius: 3px; /* Added curved corners */
}

#egh-delete-btn:hover {
    background-color: #d32f2f; /* Darker red on hover */
    border-color: #c02020;
    color: white;
}
#egh-delete-btn:disabled {
    background-color: #f44336; 
    border-color: #d32f2f;
    color: white;
    opacity: 0.5;
}
