/* ==================== */

/* Meeting Recorder      */

/* ==================== */

/* New, self-contained component. Does not alter portal baseline aesthetics
   (backgrounds, card dimensions, shadows). */

/* Composer record button — matches .claude-attach-btn / .voice-mic-btn */
.meeting-rec-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b6b6b;
    transition: all 0.15s ease;
}

.meeting-rec-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text);
}

.meeting-rec-btn.recording {
    background: #dc2626;
    color: #fff;
    animation: mrec-btn-pulse 1.5s ease-in-out infinite;
}

.meeting-rec-btn.processing {
    opacity: 0.5;
    cursor: progress;
}

@keyframes mrec-btn-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); }
    50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.08); }
}

/* Fixed recording bar — visible across tabs while recording */
.meeting-rec-bar {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 92vw;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    font-size: 14px;
    color: var(--color-text);
}

.meeting-rec-bar .mrec-label {
    font-weight: 600;
}

.meeting-rec-bar .mrec-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #6b6b6b;
}

.meeting-rec-bar .mrec-warn {
    flex-basis: 100%;
    text-align: center;
    font-size: 12px;
    color: #9a3412;
    margin-top: 2px;
}

.meeting-rec-bar .mrec-stop {
    border: none;
    background: #dc2626;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.meeting-rec-bar .mrec-stop:hover {
    background: #b91c1c;
}

/* Pulsing red dot */
.mrec-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #dc2626;
    display: inline-block;
    animation: mrec-dot-pulse 1.3s ease-in-out infinite;
}

@keyframes mrec-dot-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.45;
        transform: scale(0.82);
    }
}

/* Processing spinner */
.mrec-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: #2563eb;
    border-radius: 50%;
    display: inline-block;
    animation: mrec-spin 0.8s linear infinite;
}

@keyframes mrec-spin {
    to { transform: rotate(360deg); }
}

/* First-time consent modal */
.mrec-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mrec-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 26px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.mrec-modal-icon {
    margin-bottom: 14px;
}

.mrec-modal-icon .mrec-dot {
    width: 16px;
    height: 16px;
}

.mrec-modal h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.mrec-modal p {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6b6b6b;
}

.mrec-modal-btn {
    border: none;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 11px 20px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s ease;
}

.mrec-modal-btn:hover {
    background: #1d4ed8;
}
