/* ================================================================
   MeetFlow Integration — UI styles
   Fits the existing dark theme: #0a1224 bg, #7B61FF purple, #58E6D9 cyan
   ================================================================ */

:root {
    --mf-purple: #7b61ff;
    --mf-cyan: #58e6d9;
    --mf-dark: #0a1224;
    --mf-card: #131c30;
    --mf-border: rgba(123, 97, 255, 0.25);
    --mf-green: #22c55e;
    --mf-red: #ef4444;
    --mf-text: #e2e8f0;
    --mf-muted: #94a3b8;
    --mf-surface: rgba(255, 255, 255, 0.05);
}

/* ── newcall.html: MeetFlow section ───────────────────────────── */

.mf-section {
    margin-top: 12px;
    border-radius: 12px;
    border: 1px solid var(--mf-border);
    background: rgba(10, 18, 36, 0.90);   /* тёмный непрозрачный фон — читаемо на любом bg */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    transition: border-color 0.2s;
}

.mf-section:hover {
    border-color: rgba(123, 97, 255, 0.55);
}

/* Connect button (not yet authenticated) */
.mf-connect-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 16px;
    background: rgba(123, 97, 255, 0.08);
    border: none;
    color: var(--mf-text);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.mf-connect-btn:hover {
    background: rgba(123, 97, 255, 0.18);
    color: #fff;
}

.mf-connect-btn img {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.mf-connect-btn:hover img {
    opacity: 1;
}

/* Connected state card */
.mf-connected-card {
    padding: 12px 14px;
}

.mf-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.mf-dot {
    width: 8px;
    height: 8px;
    background: var(--mf-green);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--mf-green);
}

.mf-user-name {
    font-size: 13px;
    color: var(--mf-text);
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mf-disconnect-btn {
    background: none;
    border: none;
    color: var(--mf-muted);
    cursor: pointer;
    font-size: 15px;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.2s;
}

.mf-disconnect-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--mf-red);
}

/* Toggle row */
.mf-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 4px;
}

.mf-toggle-label {
    font-size: 13px;
    color: var(--mf-text);
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.mf-toggle-label i {
    color: var(--mf-purple);
    font-size: 12px;
}

/* Custom toggle switch */
.mf-toggle {
    position: relative;
    width: 38px;
    height: 21px;
    flex-shrink: 0;
}

.mf-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.mf-toggle-slider {
    position: absolute;
    inset: 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 21px;
    cursor: pointer;
    transition: 0.25s;
}

.mf-toggle-slider::before {
    content: '';
    position: absolute;
    height: 15px;
    width: 15px;
    left: 2px;
    bottom: 2px;
    background: var(--mf-muted);
    border-radius: 50%;
    transition: 0.25s;
}

.mf-toggle input:checked + .mf-toggle-slider {
    background: var(--mf-purple);
    border-color: var(--mf-purple);
}

.mf-toggle input:checked + .mf-toggle-slider::before {
    transform: translateX(17px);
    background: white;
}

/* Expandable options */
.mf-options {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    animation: mfSlideDown 0.2s ease;
}

@keyframes mfSlideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mf-input,
.mf-select {
    width: 100%;
    padding: 8px 11px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(123, 97, 255, 0.35);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
    font-family: inherit;
}

.mf-input:focus,
.mf-select:focus {
    border-color: var(--mf-purple);
    background: rgba(123, 97, 255, 0.07);
}

.mf-input::placeholder {
    color: var(--mf-muted);
}

.mf-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 30px;
}

.mf-select option {
    background: #1e293b;
    color: var(--mf-text);
}

.mf-hint {
    font-size: 11px;
    color: #7b8ea8;     /* slightly brighter than --mf-muted for readability */
    padding: 2px 0;
    line-height: 1.4;
}

/* Loading spinner inside select */
.mf-select.loading {
    color: var(--mf-muted);
    pointer-events: none;
}

/* ── client.html: recording indicator (top center) ───────────── */

#mfRecordingIndicator {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 18, 36, 0.88);
    border: 1px solid rgba(123, 97, 255, 0.35);
    border-radius: 24px;
    padding: 5px 14px 5px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--mf-text);
    z-index: 900;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    user-select: none;
    pointer-events: none;
    transition: opacity 0.3s;
}

#mfRecordingIndicator.hidden {
    display: none;
}

.mf-rec-dot {
    width: 8px;
    height: 8px;
    background: var(--mf-red);
    border-radius: 50%;
    flex-shrink: 0;
    animation: mfPulse 1.6s ease-in-out infinite;
}

@keyframes mfPulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.mf-rec-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.mf-rec-time {
    color: var(--mf-muted);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}

.mf-rec-project {
    color: var(--mf-purple);
    font-size: 11.5px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 7px;
    background: rgba(123, 97, 255, 0.12);
    border-radius: 10px;
}

/* ── Post-call upload overlay ─────────────────────────────────── */

#mfUploadOverlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 36, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: mfFadeIn 0.25s ease;
}

@keyframes mfFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#mfUploadOverlay.hidden {
    display: none;
}

.mf-upload-card {
    background: #131c30;
    border: 1px solid rgba(123, 97, 255, 0.3);
    border-radius: 18px;
    padding: 28px 28px 24px;
    width: 90%;
    max-width: 460px;
    animation: mfSlideUp 0.3s ease;
}

@keyframes mfSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mf-upload-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.mf-upload-logo img {
    width: 24px;
    height: 24px;
}

.mf-upload-logo span {
    font-size: 14px;
    font-weight: 600;
    color: var(--mf-text);
}

.mf-upload-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--mf-text);
    margin: 0 0 6px;
}

.mf-upload-subtitle {
    font-size: 13px;
    color: var(--mf-muted);
    margin: 0 0 22px;
    line-height: 1.5;
}

/* Progress bar */
.mf-progress-wrap {
    margin-bottom: 18px;
}

.mf-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(123, 97, 255, 0.12);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 6px;
}

.mf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mf-purple), var(--mf-cyan));
    border-radius: 5px;
    transition: width 0.5s ease;
    width: 0%;
}

.mf-progress-label {
    font-size: 12px;
    color: var(--mf-muted);
}

/* Step list */
.mf-steps {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 20px;
}

.mf-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #475569;
    transition: color 0.2s;
}

.mf-step.active {
    color: var(--mf-text);
}

.mf-step.done {
    color: var(--mf-green);
}

.mf-step.error {
    color: var(--mf-red);
}

.mf-step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.mf-step.active .mf-step-icon {
    animation: mfSpin 0.9s linear infinite;
    border-top-color: transparent;
}

.mf-step.done .mf-step-icon::after {
    content: '✓';
    font-size: 10px;
    font-weight: bold;
}

.mf-step.error .mf-step-icon::after {
    content: '✕';
    font-size: 10px;
}

@keyframes mfSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Result box */
.mf-result-box {
    background: rgba(123, 97, 255, 0.07);
    border: 1px solid rgba(123, 97, 255, 0.18);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.mf-result-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    margin-bottom: 7px;
    line-height: 1.5;
}

.mf-result-row:last-child {
    margin-bottom: 0;
}

.mf-result-label {
    color: var(--mf-muted);
    min-width: 72px;
    flex-shrink: 0;
}

.mf-result-value {
    color: var(--mf-text);
    overflow-wrap: anywhere;
}

.mf-result-tasks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mf-task-tag {
    background: rgba(88, 230, 217, 0.1);
    border: 1px solid rgba(88, 230, 217, 0.2);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--mf-cyan);
}

/* Button group */
.mf-btn-group {
    display: flex;
    gap: 9px;
}

.mf-btn {
    padding: 10px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}

.mf-btn-primary {
    background: linear-gradient(135deg, var(--mf-purple), #9d94ff);
    color: white;
    flex: 1;
}

.mf-btn-primary:hover {
    background: linear-gradient(135deg, #9d94ff, var(--mf-cyan));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.3);
}

.mf-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--mf-text);
    border: 1px solid rgba(123, 97, 255, 0.3);
}

.mf-btn-ghost:hover {
    background: rgba(123, 97, 255, 0.15);
    border-color: var(--mf-purple);
    color: #fff;
}

/* ── Meeting history (newcall page) ──────────────────────────── */

.mf-history-section {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid var(--mf-border);
    background: rgba(10, 18, 36, 0.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
}

.mf-history-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px 8px;
    font-size: 11.5px;
    color: var(--mf-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mf-history-header i {
    color: var(--mf-purple);
    font-size: 11px;
}

.mf-history-list {
    max-height: 176px;
    overflow-y: auto;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(123, 97, 255, 0.2) transparent;
}

.mf-history-list::-webkit-scrollbar {
    width: 4px;
}

.mf-history-list::-webkit-scrollbar-thumb {
    background: rgba(123, 97, 255, 0.25);
    border-radius: 4px;
}

.mf-history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    transition: background 0.15s;
}

.mf-history-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.mf-history-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow: hidden;
}

.mf-history-title {
    font-size: 12.5px;
    color: var(--mf-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mf-history-meta {
    font-size: 11px;
    color: #64748b;
}

.mf-history-link {
    color: #475569;
    font-size: 11px;
    flex-shrink: 0;
    padding: 5px 6px;
    border-radius: 6px;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1;
}

.mf-history-link:hover {
    color: var(--mf-purple);
    background: rgba(123, 97, 255, 0.12);
}

/* ── MeetFlow button in settings menu ────────────────────────── */

#meetflowBtn i {
    color: var(--mf-purple);
}

#meetflowBtn.mf-active i {
    color: var(--mf-red);
    animation: mfPulse 1.6s ease-in-out infinite;
}

/* ── Btn-group responsive wrap ────────────────────────────────── */

.mf-btn-group {
    flex-wrap: wrap;
}

/* ── Mobile responsive ───────────────────────────────────────── */

@media (max-width: 480px) {
    .mf-upload-card {
        padding: 20px 16px 18px;
        border-radius: 14px;
    }

    .mf-upload-title { font-size: 15px; }
    .mf-upload-subtitle { font-size: 12px; margin-bottom: 16px; }

    .mf-btn {
        padding: 9px 13px;
        font-size: 12px;
    }

    .mf-result-row { font-size: 12px; }

    .mf-section {
        margin-top: 8px;
    }

    .mf-connected-card {
        padding: 10px 11px;
    }

    .mf-toggle-label { font-size: 12px; }

    .mf-history-list { max-height: 140px; }

    #mfRecordingIndicator {
        top: 8px;
        font-size: 11.5px;
        padding: 4px 11px 4px 8px;
        gap: 6px;
    }
}

/* ── Transcript with timestamps ───────────────────────────────── */

.mf-ts-line {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.6;
}

.mf-ts-mark {
    color: var(--mf-purple);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    min-width: 52px;
    flex-shrink: 0;
    padding-top: 2px;
    opacity: 0.75;
}

.mf-ts-speaker {
    font-weight: 600;
    color: var(--mf-cyan);
    min-width: 60px;
    flex-shrink: 0;
}

.mf-ts-text {
    color: #cbd5e1;
    flex: 1;
}

/* ── Notification actions (email, telegram) ───────────────────── */

.mf-notify-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.mf-notify-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--mf-muted);
    transition: all 0.2s;
    font-family: inherit;
}

.mf-notify-chip:hover {
    background: rgba(123, 97, 255, 0.12);
    border-color: rgba(123, 97, 255, 0.3);
    color: var(--mf-text);
}

.mf-notify-chip i { font-size: 11px; }

/* ── Google Calendar section (newcall page) ───────────────────── */

.mf-cal-section {
    border-radius: 12px;
    border: 1px solid rgba(66, 133, 244, 0.35);
    background: rgba(10, 18, 36, 0.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    transition: border-color 0.2s;
}

.mf-cal-section:hover {
    border-color: rgba(66, 133, 244, 0.6);
}

.mf-cal-connect-btn {
    color: #94a3b8;
}

.mf-cal-connect-btn:hover {
    background: rgba(66, 133, 244, 0.1);
    color: var(--mf-text);
}

.mf-cal-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px 8px;
    font-size: 11.5px;
    color: var(--mf-muted);
    border-bottom: 1px solid rgba(66, 133, 244, 0.12);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mf-cal-header span { flex: 1; }

.mf-cal-icon-btn {
    background: none;
    border: none;
    color: #475569;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 5px;
    font-size: 11px;
    transition: all 0.2s;
    line-height: 1;
}

.mf-cal-icon-btn:hover {
    color: var(--mf-text);
    background: rgba(255, 255, 255, 0.07);
}

.mf-cal-events-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(66, 133, 244, 0.2) transparent;
}

.mf-cal-events-list::-webkit-scrollbar { width: 4px; }
.mf-cal-events-list::-webkit-scrollbar-thumb {
    background: rgba(66, 133, 244, 0.2);
    border-radius: 4px;
}

.mf-cal-loading {
    padding: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--mf-muted);
}

.mf-cal-empty {
    padding: 14px;
    text-align: center;
    font-size: 12px;
    color: #475569;
}

.mf-cal-event {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.mf-cal-event:hover {
    background: rgba(66, 133, 244, 0.07);
    border-left-color: rgba(66, 133, 244, 0.4);
}

.mf-cal-event.has-room:hover {
    border-left-color: var(--mf-purple);
    background: rgba(123, 97, 255, 0.07);
}

.mf-cal-event-time {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: #4285f4;
    min-width: 44px;
    flex-shrink: 0;
    text-align: right;
}

.mf-cal-event.has-room .mf-cal-event-time {
    color: var(--mf-purple);
}

.mf-cal-event-info {
    flex: 1;
    overflow: hidden;
}

.mf-cal-event-title {
    font-size: 12.5px;
    color: var(--mf-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mf-cal-event-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 1px;
}

.mf-cal-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 8px;
    flex-shrink: 0;
}

.mf-cal-badge-room {
    background: rgba(123, 97, 255, 0.15);
    color: var(--mf-purple);
    border: 1px solid rgba(123, 97, 255, 0.2);
}

.mf-cal-badge-ext {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ── Notification settings section ───────────────────────────── */

.mf-notify-settings-section {
    border-radius: 12px;
    border: 1px solid var(--mf-border);
    background: rgba(10, 18, 36, 0.90);   /* тёмный — тот же что mf-section */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    margin-top: 8px;
}

.mf-notify-settings-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: transparent;
    border: none;
    color: var(--mf-text);                       /* white text — clearly readable */
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background 0.2s;
}

.mf-notify-settings-toggle:hover {
    background: rgba(123, 97, 255, 0.08);
}

.mf-notify-settings-toggle i:first-child {
    color: var(--mf-purple);
    font-size: 13px;
}

.mf-notify-settings-toggle span { flex: 1; }

.mf-notify-chevron {
    font-size: 10px;
    color: var(--mf-muted);
    transition: transform 0.2s;
}

.mf-notify-chevron.open {
    transform: rotate(180deg);
}

.mf-notify-settings-body {
    padding: 6px 14px 14px;
    border-top: 1px solid rgba(123, 97, 255, 0.15);
    animation: mfSlideDown 0.2s ease;
}

.mf-notify-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--mf-text);                       /* white — readable */
    margin-bottom: 5px;
    font-weight: 500;
}

.mf-notify-field { margin-bottom: 2px; }

/* ── Per-channel integration cards ──────────────────────────────── */

.mf-int-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    margin-bottom: 7px;
    overflow: hidden;
    transition: opacity 0.2s, filter 0.2s, border-color 0.2s;
}

.mf-int-card:last-of-type { margin-bottom: 0; }

.mf-int-card.mf-int-disabled {
    opacity: 0.45;
    filter: grayscale(0.4);
}

.mf-int-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
}

.mf-int-card-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mf-text);
    user-select: none;
}

.mf-int-card-body {
    padding: 0 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mf-int-hint {
    font-size: 11px;
    color: #64748b;
}

/* Password field with eye button */
.mf-password-wrap {
    position: relative;
}

.mf-password-wrap .mf-input {
    padding-right: 34px;
}

.mf-eye-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--mf-muted);
    cursor: pointer;
    padding: 3px;
    font-size: 12px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.2s;
}

.mf-eye-btn:hover:not(:disabled) { color: var(--mf-text); }
.mf-eye-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }

/* Input error state */
.mf-input.mf-error {
    border-color: var(--mf-red) !important;
    background: rgba(239, 68, 68, 0.07) !important;
}

/* ── Notify footer (badges + save) ──────────────────────────────── */

.mf-notify-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0 2px;
    border-top: 1px solid rgba(123, 97, 255, 0.1);
    margin-top: 10px;
    flex-wrap: wrap;
}

.mf-notify-active-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
}

.mf-notify-active-label {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
}

.mf-notify-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.mf-notify-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.07);
    color: var(--mf-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mf-notify-none {
    font-size: 11px;
    color: #475569;
    font-style: italic;
}

.mt-8 { margin-top: 8px; }

@media (max-width: 480px) {
    .mf-cal-events-list { max-height: 160px; }
    .mf-cal-event { padding: 8px 10px; }
    .mf-notify-settings-body { padding: 4px 11px 10px; }
}

/* ── Live Transcript (Subtitles) panel — client.html ──────────────── */

.mf-live-panel {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: min(620px, 90vw);
    max-height: 220px;
    background: rgba(10, 18, 36, 0.88);
    border: 1px solid rgba(123, 97, 255, 0.35);
    border-radius: 14px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    z-index: 8000;
    font-family: inherit;
    transition: opacity 0.25s, transform 0.25s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.mf-live-panel-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(12px);
}

.mf-live-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 6px;
    border-bottom: 1px solid rgba(123, 97, 255, 0.18);
    flex-shrink: 0;
}

.mf-live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mf-green, #22c55e);
    box-shadow: 0 0 6px #22c55e;
    animation: mfPulse 1.4s ease-in-out infinite;
}

@keyframes mfPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.45; }
}

.mf-live-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--mf-muted, #94a3b8);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex: 1;
}

.mf-live-close {
    background: transparent;
    border: none;
    color: var(--mf-muted, #94a3b8);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.15s;
}
.mf-live-close:hover { color: var(--mf-text, #e2e8f0); }

.mf-live-body {
    overflow-y: auto;
    padding: 8px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scroll-behavior: smooth;
}

.mf-live-body::-webkit-scrollbar { width: 4px; }
.mf-live-body::-webkit-scrollbar-track { background: transparent; }
.mf-live-body::-webkit-scrollbar-thumb { background: rgba(123, 97, 255, 0.3); border-radius: 4px; }

.mf-live-entry {
    display: flex;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(226, 232, 240, 0.75);
    transition: color 0.2s;
}

.mf-live-entry.mf-live-final {
    color: var(--mf-text, #e2e8f0);
}

.mf-live-self .mf-live-name {
    color: var(--mf-cyan, #58e6d9);
}

.mf-live-name {
    font-weight: 600;
    white-space: nowrap;
    color: var(--mf-purple, #7b61ff);
    min-width: 0;
    flex-shrink: 0;
}

.mf-live-text {
    word-break: break-word;
}

/* ── CC toggle button in call (client.html) ───────────────────────── */

#mfCaptionToggleWrap {
    display: none; /* shown via JS when live transcript is initialized */
}

.mf-caption-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid rgba(123, 97, 255, 0.35);
    background: rgba(10, 18, 36, 0.75);
    color: var(--mf-muted, #94a3b8);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.03em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mf-caption-toggle-btn:hover {
    border-color: rgba(123, 97, 255, 0.6);
    color: var(--mf-text, #e2e8f0);
    background: rgba(123, 97, 255, 0.12);
}

.mf-caption-toggle-btn.mf-caption-active {
    border-color: var(--mf-cyan, #58e6d9);
    color: var(--mf-cyan, #58e6d9);
    background: rgba(88, 230, 217, 0.1);
    box-shadow: 0 0 10px rgba(88, 230, 217, 0.15);
}

@media (max-width: 480px) {
    .mf-live-panel { bottom: 68px; width: 94vw; }
    .mf-live-entry { font-size: 12px; }
}
