/* === MEETING PAGE === */

/* Reuse btn-back-link from translate.css if loaded; redefine in case it isn't */
.btn-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    margin-right: 8px;
    transition: background 0.2s;
}
.btn-back-link:hover { background: #f0f0f0; }

.home-topbar-left {
    display: flex;
    align-items: center;
}

/* BETA badge */
.beta-badge {
    display: inline-block;
    background: #007A3D;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    line-height: 1.2;
}
.bottom-nav-item .beta-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(28px);
    font-size: 8px;
    padding: 1px 4px;
}
.bottom-nav-item {
    position: relative;
}

/* State sections */
.meeting-state {
    padding: 16px 20px 32px;
    max-width: 820px;
    margin: 0 auto;
}

/* Intro block */
.meeting-intro {
    text-align: center;
    margin: 12px 0 20px;
}
.meeting-intro h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1F3864;
    margin: 0 0 6px;
}
.meeting-intro p {
    color: #666;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 560px;
}

/* Meeting name field */
.meeting-name-field {
    max-width: 480px;
    margin: 0 auto 20px;
}
.meeting-name-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.meeting-name-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.meeting-name-field input:focus {
    outline: none;
    border-color: #007A3D;
}

/* Tab switcher */
.meeting-tabs {
    display: flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    padding: 4px;
    max-width: 380px;
    margin: 0 auto 24px;
}
.meeting-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.meeting-tab:hover { color: #1F3864; }
.meeting-tab.active {
    background: #007A3D;
    color: #fff;
}
.meeting-tab svg { flex-shrink: 0; }

.meeting-tab-panel { display: none; }
.meeting-tab-panel.active { display: block; }

/* ── Record panel ──────────────────────────────────────────────────────── */
.record-panel {
    background: #fff;
    border-radius: 16px;
    padding: 36px 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.record-btn {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #007A3D;
    color: #007A3D;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    margin: 8px auto 16px;
    position: relative;
}
.record-btn:hover {
    background: #f0faf4;
    transform: scale(1.03);
}
.record-btn svg { width: 56px; height: 56px; }

.record-btn.recording {
    background: #d62828;
    border-color: #b51e1e;
    color: #fff;
    animation: pulse-record 1.4s ease-in-out infinite;
}
.record-btn.recording:hover {
    background: #c0202d;
}
.record-btn.paused {
    background: #fff;
    border-color: #f4a72c;
    color: #f4a72c;
}

@keyframes pulse-record {
    0%, 100% { box-shadow: 0 0 0 0 rgba(214, 40, 40, 0.5); }
    50%      { box-shadow: 0 0 0 14px rgba(214, 40, 40, 0); }
}

.record-status {
    font-size: 0.85rem;
    color: #888;
    margin: 8px 0 4px;
    min-height: 1.1em;
}
.record-status.recording { color: #d62828; font-weight: 600; }
.record-status.paused    { color: #f4a72c; font-weight: 600; }

.record-timer {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 2.1rem;
    font-weight: 700;
    color: #1F3864;
    margin: 6px 0 10px;
    letter-spacing: 1px;
}

.record-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.record-warning {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 12px;
    background: #fff7e6;
    color: #b8741b;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
}

.record-unsupported {
    background: #fff7e6;
    border: 1px solid #f4d8a6;
    color: #8a5a14;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 16px;
    text-align: left;
    line-height: 1.5;
}

/* ── Upload panel (file picker) ────────────────────────────────────────── */
.upload-panel {
    background: #fff;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.upload-dropzone {
    background: #fafafa;
    border: 2px dashed #d0d0d0;
    border-radius: 14px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
}
.upload-dropzone:hover {
    border-color: #007A3D;
    background: #f0faf4;
}
.upload-dropzone svg {
    color: #007A3D;
    opacity: 0.75;
    margin-bottom: 6px;
}
.upload-dropzone-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1F3864;
    margin: 8px 0 4px;
}
.upload-dropzone-hint {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}
.upload-dropzone-formats {
    font-size: 0.76rem;
    color: #999;
    margin: 8px 0 0;
}
.upload-dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.selected-audio-info {
    background: #f0faf4;
    border: 1px solid #c4e6d2;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}
.selected-audio-info .audio-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}
.selected-audio-info .audio-name {
    flex: 1;
    min-width: 0;
    color: #1F3864;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.selected-audio-info .audio-meta {
    font-size: 0.8rem;
    color: #666;
}
.selected-audio-info .audio-clear {
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
}
.selected-audio-info .audio-clear:hover { color: #d62828; background: #fff; }

.upload-actions {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

/* ── Processing panel ──────────────────────────────────────────────────── */
.processing-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    text-align: center;
}
.processing-box h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1F3864;
    margin: 0 0 8px;
}
.processing-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #eee;
    border-top-color: #007A3D;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 18px auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.processing-subtitle {
    color: #666;
    font-size: 0.92rem;
    margin: 0 0 6px;
}
.processing-hint {
    color: #999;
    font-size: 0.8rem;
    font-style: italic;
    margin: 4px 0 0;
}

.stepper {
    list-style: none;
    padding: 0;
    margin: 18px auto 0;
    max-width: 380px;
    text-align: left;
}
.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #aaa;
    font-size: 0.92rem;
    transition: color 0.2s;
}
.step-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    flex-shrink: 0;
    transition: all 0.25s;
}
.step.active { color: #1F3864; font-weight: 600; }
.step.active .step-dot {
    background: #007A3D;
    box-shadow: 0 0 0 4px rgba(0, 122, 61, 0.15);
    animation: pulse-dot 1.2s ease-in-out infinite;
}
.step.done { color: #555; }
.step.done .step-dot { background: #007A3D; }
.step.done .step-dot::after {
    content: '';
    display: block;
    width: 4px;
    height: 7px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) translate(-1px, -1px);
    margin: 1px 0 0 3px;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
}

/* ── Review state ──────────────────────────────────────────────────────── */
.review-intro {
    color: #666;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 8px 0 20px;
    text-align: center;
}

.meeting-form-section {
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.meeting-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.meeting-actions-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Subordinate delete button (text-like) */
.btn-subordinate {
    background: transparent;
    border: 1px solid #e5e5e5;
    color: #888;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-subordinate:hover {
    border-color: #d62828;
    color: #d62828;
    background: #fff5f5;
}
.btn-subordinate svg { flex-shrink: 0; }

/* ── Footer note (privacy) ─────────────────────────────────────────────── */
.meeting-footer-note {
    text-align: center;
    color: #999;
    font-size: 0.78rem;
    margin: 24px auto 12px;
    max-width: 480px;
    font-style: italic;
}

/* ── Toast (top-right slide-in) ────────────────────────────────────────── */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1500;
    background: #1F3864;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 200px;
    max-width: 340px;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.25s, transform 0.3s cubic-bezier(.34,1.56,.64,1);
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.toast.success { background: #007A3D; }
.toast.error   { background: #c0202d; }
.toast.warn    { background: #b8741b; }

/* ── Generate state ────────────────────────────────────────────────────── */
.generate-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.generate-box h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1F3864;
    margin: 0 0 8px;
}
.generate-box p {
    color: #666;
    margin: 0 0 18px;
    line-height: 1.5;
}
.generate-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Loading overlay ───────────────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.loading-overlay .spinner {
    width: 48px; height: 48px;
    border: 4px solid #eee;
    border-top-color: #007A3D;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 14px;
}

/* ── Flavor selector (pre-upload + re-render) ──────────────────────────── */
.flavor-selector {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    margin: 0 auto 18px;
    max-width: 720px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.flavor-selector::-webkit-scrollbar { height: 4px; }
.flavor-selector::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }
.flavor-chip {
    flex-shrink: 0;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    color: #555;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.2;
}
.flavor-chip:hover {
    border-color: #007A3D;
    color: #1F3864;
    background: #f7fbf9;
}
.flavor-chip.active {
    background: #007A3D;
    border-color: #007A3D;
    color: #fff;
}
.flavor-chip.active:hover {
    background: #006633;
}

/* ── Transcript panel (review state) ───────────────────────────────────── */
.transcript-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 20px 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.transcript-panel > summary {
    cursor: pointer;
    font-weight: 700;
    color: #1F3864;
    font-size: 0.95rem;
    padding: 4px 0;
    -webkit-user-select: none;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.transcript-panel > summary::-webkit-details-marker { display: none; }
.transcript-panel > summary::before {
    content: '▸';
    display: inline-block;
    font-size: 0.8em;
    transition: transform 0.2s;
    color: #007A3D;
}
.transcript-panel[open] > summary::before {
    transform: rotate(90deg);
}
.transcript-actions {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 8px;
}
.transcript-text {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 14px;
    font-family: 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #333;
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

/* ── Re-render row (review state) ──────────────────────────────────────── */
.rerender-row {
    background: #f7fbf9;
    border: 1px dashed #c4e6d2;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 0 20px;
}
.rerender-row > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1F3864;
    margin-bottom: 10px;
}
.rerender-row .flavor-selector {
    margin: 0 0 8px;
}
.spinner-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    color: #007A3D;
    font-size: 0.85rem;
    font-weight: 600;
}
.spinner-mini {
    width: 14px;
    height: 14px;
    border: 2px solid #d0e9da;
    border-top-color: #007A3D;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .record-btn { width: 116px; height: 116px; }
    .record-btn svg { width: 48px; height: 48px; }
    .record-timer { font-size: 1.8rem; }
    .meeting-actions { flex-direction: column; align-items: stretch; }
    .meeting-actions-right { justify-content: stretch; }
    .meeting-actions-right .btn { flex: 1; }
    .toast { right: 12px; left: 12px; max-width: none; }
    .flavor-chip { padding: 8px 13px; font-size: 0.83rem; }
    .transcript-text { font-size: 0.8rem; max-height: 240px; }
}
