/* Meetings browser page styles */

.meetings-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.meetings-count {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.meetings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.meetings-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 2rem 0;
}

/* Meeting card */
.meeting-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.15s;
}

.meeting-card:hover {
    border-color: #cbd5e1;
}

.meeting-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
}

.meeting-card-header:hover {
    background: #f8fafc;
}

.meeting-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
    white-space: nowrap;
    min-width: 80px;
}

.meeting-title {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meeting-customer {
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 3px;
    padding: 2px 8px;
    white-space: nowrap;
}

.meeting-badges {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.meeting-badge {
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 500;
}

.meeting-badge.transcript {
    background: #dbeafe;
    color: #1d4ed8;
}

.meeting-badge.notes {
    background: #d1fae5;
    color: #047857;
}

.meeting-badge.onenote {
    background: #ede9fe;
    color: #6d28d9;
}

.meeting-badge.intel {
    background: #fef3c7;
    color: #b45309;
}

.meeting-badge.action-failed {
    background: #fee2e2;
    color: #dc2626;
}

.meeting-type-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.meeting-type-badge.internal {
    background: #e0e7ff;
    color: #4338ca;
}

.meeting-mentioned {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
    max-width: 300px;
}

.meeting-mentioned-chip {
    font-size: 0.6rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 3px;
    padding: 1px 5px;
    white-space: nowrap;
}

/* Action status rows in detail view */
.action-status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.8rem;
}

.action-status-label {
    font-weight: 500;
    color: #475569;
    min-width: 120px;
}

.action-status-success { color: #16a34a; font-weight: 500; }
.action-status-failed { color: #dc2626; font-weight: 500; }
.action-status-running { color: #d97706; font-weight: 500; }
.action-status-pending { color: #94a3b8; }

.action-retry-btn {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.action-retry-btn:hover {
    background: #dc2626;
    color: white;
}

.action-retry-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.meeting-delete-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    transition: all 0.15s;
}

.meeting-delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Expanded detail */
.meeting-detail {
    display: none;
    border-top: 1px solid #e2e8f0;
    padding: 1rem;
    background: #f8fafc;
}

.meeting-detail.open {
    display: block;
}

.meeting-detail-section {
    margin-bottom: 0.75rem;
}

.meeting-detail-section:last-child {
    margin-bottom: 0;
}

.meeting-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.meeting-detail-content {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* key_points renders structured HTML — suppress pre-wrap whitespace */
.meeting-detail-content:has(.kp-item) {
    white-space: normal;
}

.meeting-detail-content ul {
    margin: 0;
    padding-left: 1.25rem;
}

.meeting-detail-content li {
    margin-bottom: 0.15rem;
}

.meeting-detail-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.meeting-detail-link {
    font-size: 0.75rem;
    color: #3b82f6;
    text-decoration: none;
}

.meeting-detail-link:hover {
    text-decoration: underline;
}

/* Transcript preview */
.meeting-transcript-preview {
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.8rem;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    padding: 0.5rem;
    white-space: pre-wrap;
}

/* Load more */
.load-more-wrap {
    text-align: center;
    padding: 0.5rem 0;
}

/* ── Import Modal ──────────────────────────────────────────────────────── */

.import-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.import-modal-backdrop.hidden {
    display: none;
}

.import-modal {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.import-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.import-modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.import-close-btn {
    background: none;
    border: none;
    font-size: 1rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.import-close-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.import-textarea {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 120px;
}

.import-provider-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.import-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Review cards */
.import-review-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: #f8fafc;
}

.import-review-card:last-child {
    margin-bottom: 0;
}

.import-review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.import-review-header .import-cb {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.import-review-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.import-review-field {
    margin-bottom: 0.5rem;
}

.import-review-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.2rem;
}

.import-review-field input,
.import-review-field textarea {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 0.35rem;
    font-size: 0.825rem;
    color: #1e293b;
    background: #fff;
    outline: none;
}

.import-review-field input:focus,
.import-review-field textarea:focus {
    border-color: #3b82f6;
}

.import-review-field textarea {
    resize: vertical;
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 60px;
}

.import-review-sections {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.import-review-sections-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hidden {
    display: none !important;
}

/* ── Import Modal — mode tabs ──────────────────────────────────────────── */

.import-mode-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0;
}

.import-mode-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    border-radius: 0;
}

.import-mode-tab:hover {
    color: #1e293b;
}

.import-mode-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.import-mode-panel {
    /* panels swap in/out via .hidden */
}

/* Metadata row (title + date side by side) */
.import-meta-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    align-items: end;
}

.import-meta-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.import-meta-field input[type="date"] {
    width: 150px;
}

.import-notes-sections {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

/* ── Update Transcript Button (in detail view) ─────────────────────────── */

.meeting-detail-actions {
    margin-bottom: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.meeting-update-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.meeting-update-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #1e293b;
}

.meeting-copy-notes-btn {
    margin-left: auto;
    background: none;
    border: 1px solid #cbd5e1;
    color: #94a3b8;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.15s;
}

.meeting-copy-notes-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #475569;
}

.meeting-copy-notes-btn.kp-copy-ok {
    color: #16a34a;
    border-color: #86efac;
    background: #f0fdf4;
}

/* ── Update Transcript Modal ───────────────────────────────────────────── */

.ut-drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    padding: 1.25rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    background: #f8fafc;
    margin-bottom: 0;
}

.ut-drop-zone:hover,
.ut-drop-zone.ut-drop-active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.ut-or-divider {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0.6rem 0;
    position: relative;
}

.ut-or-divider::before,
.ut-or-divider::after {
    content: '';
    display: inline-block;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
    vertical-align: middle;
    margin: 0 0.5rem;
}

/* Preview box */
.ut-preview-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.ut-preview-stat {
    font-size: 0.85rem;
    color: #0369a1;
    margin-bottom: 0.5rem;
}

.ut-preview-segments {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ut-preview-segment {
    background: #fff;
    border: 1px solid #e0f2fe;
    border-radius: 0.35rem;
    padding: 0.4rem 0.6rem;
}

.ut-seg-speaker {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0284c7;
    margin-right: 0.5rem;
}

.ut-seg-time {
    font-size: 0.7rem;
    color: #64748b;
}

.ut-seg-text {
    font-size: 0.8rem;
    color: #334155;
    margin-top: 0.2rem;
}

/* Action rows */
.ut-actions-section {
    margin-bottom: 0.5rem;
}

.ut-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 1rem;
}

.ut-action-row:last-child {
    border-bottom: none;
}

.ut-action-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
}

.ut-action-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.ut-action-note {
    font-size: 0.75rem;
    white-space: nowrap;
}

.ut-action-note-never  { color: #94a3b8; }
.ut-action-note-ran    { color: #16a34a; }
.ut-action-note-failed { color: #dc2626; }

/* -- Key Discussion Points: expandable items ----------------------------- */
.kp-item {
    margin-bottom: 0.35rem;
}

.kp-header {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0.2rem 0;
    border-radius: 0.25rem;
}

.kp-header:hover {
    background: #f1f5f9;
}

.kp-caret {
    display: inline-block;
    font-size: 0.7rem;
    color: #64748b;
    transition: transform 0.15s ease;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.kp-caret.kp-open {
    transform: rotate(90deg);
}

.kp-title {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.4;
}

.kp-details {
    margin: 0.15rem 0 0.35rem 1.1rem;
    padding-left: 0.75rem;
    border-left: 2px solid #e2e8f0;
    list-style: disc;
}

.kp-details li {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 0.15rem;
}

.kp-copy-btn {
    margin-left: auto;
    background: none;
    border: none;
    padding: 0.1rem 0.25rem;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 3px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.kp-item:hover .kp-copy-btn {
    opacity: 1;
}

.kp-copy-btn:hover {
    color: #475569;
    background: #e2e8f0;
}

.kp-copy-btn.kp-copy-ok {
    color: #16a34a;
    opacity: 1;
}

/* -- Speaker Identification Review --------------------------------------- */
.speaker-review-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.speaker-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

.speaker-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
}

.speaker-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.speaker-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    min-width: 80px;
}

.speaker-card-arrow {
    color: #94a3b8;
    font-size: 0.85rem;
}

.speaker-name-select {
    min-width: 180px;
    max-width: 260px;
}

.speaker-conf {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
}

.conf-high   { background: #d1fae5; color: #047857; }
.conf-medium { background: #fef3c7; color: #b45309; }
.conf-low    { background: #fee2e2; color: #dc2626; }

.speaker-evidence-list {
    margin: 0.4rem 0 0.25rem 0;
}

.speaker-evidence {
    font-size: 0.8rem;
    color: #475569;
    font-style: italic;
    padding: 0.15rem 0 0.15rem 0.5rem;
    border-left: 2px solid #cbd5e1;
    margin-bottom: 0.25rem;
}

.speaker-expand-toggle {
    font-size: 0.8rem;
    color: #3b82f6;
    cursor: pointer;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.speaker-expand-toggle:hover {
    color: #1d4ed8;
}

.speaker-transcript-expanded {
    margin-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.5rem;
}

.speaker-transcript-body {
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    padding: 0.5rem;
}

.speaker-transcript-seg {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.speaker-transcript-seg:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
