/* ========================================
   SPREADSHEET STYLES (for Rundown)
   ======================================== */

.spreadsheet-container {
    position: relative;
    overflow: auto;
    max-height: calc(100vh - 300px);
    border: 1px solid #374151;
    border-radius: 8px;
    background: #1f2937;
}

.spreadsheet {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    font-size: 14px;
}

.spreadsheet td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.spreadsheet thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #374151;
}

.spreadsheet th {
    position: relative;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #9ca3af;
    border: 1px solid #4b5563;
    background: #374151;
    user-select: none;
    white-space: nowrap;
}

.spreadsheet .row-header {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    text-align: center;
    background: #374151;
    color: #6b7280;
    font-size: 11px;
    padding: 4px;
    position: relative;
    cursor: default;
}

.spreadsheet td {
    padding: 6px 10px;
    border: 1px solid #374151;
    vertical-align: top;
    position: relative;
    min-height: 32px;
    transition: background-color 0.1s;
}

.spreadsheet td.selected {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
    background: rgba(59, 130, 246, 0.1) !important;
    z-index: 2;
}

.spreadsheet td.editing {
    outline: 2px solid #22c55e;
    outline-offset: -2px;
    background: rgba(34, 197, 94, 0.1) !important;
}

.spreadsheet td[contenteditable="true"]:focus {
    outline: 2px solid #22c55e;
    outline-offset: -2px;
}

.spreadsheet td:not(.row-header):hover {
    background: rgba(255, 255, 255, 0.03);
}

.spreadsheet td:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* ========================================
   SPREADSHEET TOOLBAR
   ======================================== */

.spreadsheet-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #374151;
    border-bottom: 1px solid #4b5563;
    position: sticky;
    top: 0;
    z-index: 20;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: #1f2937;
    border-radius: 6px;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: #4b5563;
    margin: 0 4px;
}

.cell-info {
    font-size: 12px;
    color: #6b7280;
    margin-left: auto;
    padding: 4px 8px;
    background: #1f2937;
    border-radius: 4px;
}

.cell-info .segment-name {
    color: #a5b4fc;
    font-weight: 500;
}
