/* Meeting notes ("Take notes") — toolbar badge, banner, notes panel, confirm dialog. */

/* ── toolbar button + status badge ─────────────────────────────────────────── */
#takeNotesButton {
    position: relative;
}

#takeNotesButton.mn-recording,
#takeNotesButton.mn-writing {
    color: #1a73e8 !important;
}

#takeNotesButton .mn-badge {
    display: none;
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-sizing: border-box;
}

#takeNotesButton.mn-recording .mn-badge {
    display: block;
    background: #ea4335;
    animation: mn-pulse 1.6s ease-in-out infinite;
}

#takeNotesButton.mn-writing .mn-badge {
    display: block;
    border: 2px solid #c6dafc;
    border-top-color: #1a73e8;
    background: #fff;
    animation: mn-spin 0.8s linear infinite;
}

#takeNotesButton.mn-ready .mn-badge {
    display: block;
    background: #188038;
}

#takeNotesButton.mn-failed .mn-badge {
    display: block;
    background: #f9ab00;
}

@keyframes mn-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

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

.mn-spinner {
    display: inline-block;
    flex: none;
    width: 14px;
    height: 14px;
    border: 2px solid #c6dafc;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: mn-spin 0.8s linear infinite;
    vertical-align: -2px;
}

/* ── banner ─────────────────────────────────────────────────────────────────── */
.mn-banner {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translate(-50%, -150%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 8px 10px 8px 14px;
    border-radius: 999px;
    background: #1f2937;
    color: #fff;
    font-size: 14px;
    line-height: 1.3;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease;
    pointer-events: none;
}

.mn-banner.mn-show {
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.mn-banner i {
    color: #8ab4f8;
}

.mn-banner .mn-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: #8ab4f8;
}

.mn-banner-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Explicit hover/focus colours: conference.css's global `button:hover` sets dark green text. */
.mn-banner .mn-banner-btn,
.mn-banner .mn-banner-btn:hover,
.mn-banner .mn-banner-btn:focus {
    flex: none;
    border: 0;
    border-radius: 999px;
    padding: 4px 12px;
    background: #3c4a5e;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.mn-banner .mn-banner-btn:hover {
    background: #4b5b72;
}

/* ── notes panel ────────────────────────────────────────────────────────────── */
.mn-panel {
    position: fixed;
    right: 16px;
    bottom: 96px;
    z-index: 9999;
    width: min(340px, calc(100vw - 32px));
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    font-size: 14px;
    line-height: 1.45;
}

.mn-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
}

.mn-panel-head .mn-ok {
    color: #188038;
}

.mn-panel-head .mn-warn {
    color: #e37400;
}

.mn-live-dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ea4335;
    animation: mn-pulse 1.6s ease-in-out infinite;
}

.mn-panel-sub {
    margin: 4px 0 0;
    color: #5f6368;
    overflow-wrap: anywhere;
}

.mn-panel-note {
    margin: 12px 0 0;
    color: #5f6368;
    font-size: 13px;
}

.mn-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 12px 0 0;
}

.mn-facts dt {
    color: #5f6368;
    font-weight: 400;
}

.mn-facts dd {
    margin: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.mn-bar {
    height: 8px;
    margin: 14px 0 0;
    border-radius: 999px;
    background: #e8eaed;
    overflow: hidden;
}

.mn-bar-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: #1a73e8;
    transition: width 0.9s linear;
}

.mn-bar-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    color: #5f6368;
    font-size: 13px;
}

.mn-bar-pct {
    flex: none;
    font-variant-numeric: tabular-nums;
}

.mn-panel-actions,
.mn-dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

.mn-panel-actions button,
.mn-dialog-actions button {
    border: 0;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.mn-panel-actions button i {
    margin-right: 4px;
}

.mn-panel-actions button:disabled {
    opacity: 0.7;
    cursor: default;
}

/* Primary (blue) */
.mn-panel-actions .mn-save,
.mn-panel-actions .mn-save:hover,
.mn-panel-actions .mn-save:focus,
.mn-dialog-actions .mn-start,
.mn-dialog-actions .mn-start:hover,
.mn-dialog-actions .mn-start:focus {
    background: #1a73e8;
    color: #fff;
}

.mn-panel-actions .mn-save:hover,
.mn-dialog-actions .mn-start:hover {
    background: #1765cc;
}

/* Destructive (red) */
.mn-panel-actions .mn-stop,
.mn-panel-actions .mn-stop:hover,
.mn-panel-actions .mn-stop:focus {
    background: #ea4335;
    color: #fff;
}

.mn-panel-actions .mn-stop:hover {
    background: #d33426;
}

/* Secondary (grey) */
.mn-panel-actions .mn-close,
.mn-panel-actions .mn-close:hover,
.mn-panel-actions .mn-close:focus,
.mn-panel-actions .mn-dismiss,
.mn-panel-actions .mn-dismiss:hover,
.mn-panel-actions .mn-dismiss:focus,
.mn-dialog-actions .mn-cancel,
.mn-dialog-actions .mn-cancel:hover,
.mn-dialog-actions .mn-cancel:focus {
    background: #f1f3f4;
    color: #1f2937;
}

.mn-panel-actions .mn-close:hover,
.mn-panel-actions .mn-dismiss:hover,
.mn-dialog-actions .mn-cancel:hover {
    background: #e3e5e8;
}

/* ── start dialog ───────────────────────────────────────────────────────────── */
.mn-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
}

.mn-dialog {
    width: min(440px, 100%);
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
}

.mn-dialog h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.mn-dialog p {
    margin: 0 0 14px;
    color: #5f6368;
    font-size: 14px;
    line-height: 1.45;
}

.mn-past:empty {
    display: none;
}

.mn-past {
    margin: 0 0 14px;
    font-size: 13px;
}

.mn-past-h {
    font-weight: 600;
    margin-bottom: 4px;
}

.mn-past a,
.mn-past a:hover {
    display: block;
    padding: 4px 0;
    color: #1a73e8;
    overflow-wrap: anywhere;
}

.mn-past a span {
    color: #5f6368;
}

@media (prefers-reduced-motion: reduce) {
    .mn-spinner,
    .mn-live-dot,
    #takeNotesButton .mn-badge {
        animation: none !important;
    }

    .mn-bar-fill {
        transition: none;
    }
}
