/* Editor */
.excalidraw-editor-panel {
    margin-bottom: 15px;
}

.excalidraw-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.excalidraw-editor-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.excalidraw-editor-frame-wrap {
    position: relative;
    width: 100%;
    height: calc(100vh - 220px);
    min-height: 480px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.excalidraw-editor-frame {
    width: 100%;
    height: 100%;
    border: 0;
}

.excalidraw-editor-workspace {
    display: flex;
    flex-direction: column;
}

.excalidraw-editor-workspace:fullscreen,
.excalidraw-editor-workspace:-webkit-full-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 12px 16px 16px;
    background: #fff;
    box-sizing: border-box;
}

.excalidraw-editor-workspace:fullscreen .excalidraw-editor-frame-wrap,
.excalidraw-editor-workspace:-webkit-full-screen .excalidraw-editor-frame-wrap {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

.excalidraw-editor-workspace-fixed {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    padding: 12px 16px 16px;
    background: #fff;
    box-sizing: border-box;
}

.excalidraw-editor-workspace-fixed .excalidraw-editor-frame-wrap {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

body.excalidraw-fullscreen-active {
    overflow: hidden;
}

.excalidraw-collaboration-panel {
    margin-bottom: 12px;
}

.excalidraw-collaboration-options label {
    display: block;
    font-weight: normal;
    margin-bottom: 6px;
}

.excalidraw-delete-form {
    display: inline-flex;
    margin: 0;
}

/* Whiteboard list */
.excalidraw-whiteboard-list .excalidraw-list-body {
    padding: 16px;
}

.excalidraw-wb-empty {
    text-align: center;
    padding: 48px 24px;
    color: #888;
}

.excalidraw-wb-empty .fa {
    font-size: 42px;
    margin-bottom: 12px;
    opacity: 0.35;
}

.excalidraw-wb-empty p {
    margin: 0;
    font-size: 15px;
}

.excalidraw-wb-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.excalidraw-wb-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.excalidraw-wb-card:hover {
    border-color: #c5cdd8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.excalidraw-wb-card-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.excalidraw-wb-card-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f0f4ff;
    color: #4a6cf7;
    font-size: 18px;
}

.excalidraw-wb-card-info {
    min-width: 0;
    flex: 1;
}

.excalidraw-wb-card-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.excalidraw-wb-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #222;
    word-break: break-word;
}

.excalidraw-wb-card-meta {
    margin: 0;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.excalidraw-wb-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .excalidraw-wb-card {
        flex-direction: column;
        align-items: stretch;
    }

    .excalidraw-wb-card-actions {
        justify-content: flex-start;
        padding-top: 4px;
        border-top: 1px solid var(--bs-border-color, #eee);
    }
}

/* Instructions panel */
.excalidraw-instructions-panel {
    margin-top: 24px;
    margin-bottom: 0;
    padding: 0 0 16px;
    border: 1px solid #c8daf8;
    border-radius: 10px;
    background: #f5f9ff;
    color: #333;
    overflow: hidden;
}

.excalidraw-instructions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 16px 18px;
    background: linear-gradient(90deg, #b8cff5 0%, #d4e3fb 50%, #b8cff5 100%);
    border-bottom: 1px solid #9ebef0;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.45);
}

.excalidraw-instructions-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: #123066;
    letter-spacing: 0.01em;
}

.excalidraw-instructions-title .fa {
    margin-right: 10px;
    color: #2f5fd0;
    font-size: 0.9em;
}

.excalidraw-instructions-dismiss {
    flex-shrink: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.55);
    color: #35507f;
    font-size: 18px;
    line-height: 1;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.excalidraw-instructions-dismiss:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #123066;
}

.excalidraw-instructions-section {
    margin-bottom: 16px;
    padding: 0 18px 4px;
}

.excalidraw-instructions-section:last-child {
    margin-bottom: 0;
}

.excalidraw-instructions-section h5 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a3a6b;
}

.excalidraw-instructions-section p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.55;
}

.excalidraw-instructions-list {
    margin: 0 0 10px 18px;
    padding: 0;
    font-size: 14px;
    line-height: 1.55;
}

.excalidraw-instructions-list li {
    margin-bottom: 4px;
}

.excalidraw-instructions-note {
    font-size: 13px;
    color: #555;
    font-style: italic;
}

.excalidraw-shortcuts-table {
    margin-bottom: 12px;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
}

.excalidraw-shortcuts-table th {
    background: #eef3fb;
    font-weight: 600;
}

.excalidraw-shortcuts-table td,
.excalidraw-shortcuts-table th {
    padding: 6px 10px !important;
    vertical-align: middle;
}

.excalidraw-shortcuts-table kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f7f7f7;
    box-shadow: inset 0 -1px 0 #ccc;
}

.excalidraw-external-link {
    font-weight: 600;
}

.excalidraw-instructions-show {
    margin: 24px 0 0;
    padding: 0;
    border: 1px solid #9ebef0;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(90deg, #b8cff5 0%, #d4e3fb 50%, #b8cff5 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.45);
}

.excalidraw-instructions-show a {
    display: block;
    padding: 16px 18px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: #123066;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.excalidraw-instructions-show a:hover {
    background: rgba(255, 255, 255, 0.25);
    text-decoration: none;
}
