/* IVA Memory Training recorder — sits above IVA chrome */

.iva-mt-fab-stack {
    position: fixed;
    right: 22px;
    bottom: 92px;
    z-index: 10020;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.iva-mt-fab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    color: #e2e8f0;
    background: linear-gradient(165deg, #0f172a 0%, #134e4a 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(45, 212, 191, 0.45);
    font-size: 13px;
    font-weight: 600;
}

.iva-mt-fab--secondary {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

.iva-mt-fab:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.iva-mt-fab__label {
    letter-spacing: 0.02em;
}

.iva-mt-recorder-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10025;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #0f172a 0%, #134e4a 55%, #0f766e 100%);
    color: #ecfdf5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font-size: 13px;
}

.iva-mt-recorder-bar__left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.iva-mt-rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f87171;
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7);
    animation: iva-mt-pulse 1.4s infinite;
}

@keyframes iva-mt-pulse {
    0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(248, 113, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

.iva-mt-recorder-bar__route {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.9;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.iva-mt-recorder-bar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.iva-mt-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.iva-mt-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.35);
    color: #ecfdf5;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
}

.iva-mt-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.iva-mt-btn--danger {
    background: rgba(127, 29, 29, 0.55);
    border-color: rgba(248, 113, 113, 0.45);
}

.iva-mt-btn--primary {
    background: #0d9488;
    border-color: #5eead4;
    color: #042f2e;
}

.iva-mt-review-overlay {
    position: fixed;
    inset: 0;
    z-index: 10030;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.iva-mt-review-panel {
    width: min(1100px, 96vw);
    height: min(820px, 92vh);
    background: #0b1220;
    color: #e2e8f0;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.iva-mt-review-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.iva-mt-review-header h2 {
    margin: 0;
    font-size: 18px;
}

.iva-mt-review-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.iva-mt-icon-btn {
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 18px;
    cursor: pointer;
}

.iva-mt-review-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 0;
    flex: 1;
}

.iva-mt-session-list {
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    padding: 12px;
    overflow: auto;
}

.iva-mt-session-list h3,
.iva-mt-session-detail h3,
.iva-mt-session-detail h4 {
    margin: 0 0 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.iva-mt-session-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.iva-mt-session-item {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: rgba(30, 41, 59, 0.55);
    color: inherit;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
}

.iva-mt-session-item--active {
    border-color: rgba(45, 212, 191, 0.55);
    background: rgba(15, 118, 110, 0.25);
}

.iva-mt-session-item__title {
    display: block;
    font-weight: 600;
    font-size: 13px;
}

.iva-mt-session-item__meta {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #94a3b8;
}

.iva-mt-session-detail {
    padding: 14px 16px;
    overflow: auto;
}

.iva-mt-detail-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.iva-mt-detail-head h3 {
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    color: #f8fafc;
    font-size: 16px;
}

.iva-mt-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.15);
    color: #99f6e4;
}

.iva-mt-label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.iva-mt-textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #020617;
    color: #e2e8f0;
    padding: 10px;
    resize: vertical;
    font: inherit;
}

.iva-mt-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px;
}

.iva-mt-steps {
    margin: 0 0 16px;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
}

.iva-mt-steps code {
    display: block;
    margin-top: 2px;
    color: #7dd3fc;
    word-break: break-all;
}

.iva-mt-step-kind {
    display: inline-block;
    min-width: 52px;
    font-weight: 700;
    color: #5eead4;
}

.iva-mt-entry {
    display: block;
    color: #cbd5e1;
}

.iva-mt-skill {
    white-space: pre-wrap;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 12px;
    font-size: 12px;
    max-height: 320px;
    overflow: auto;
}

.iva-mt-muted {
    color: #94a3b8;
    font-size: 13px;
}

.iva-mt-error {
    color: #fda4af;
    font-size: 13px;
}

.iva-mt-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: iva-mt-spin 0.7s linear infinite;
    vertical-align: -2px;
}

@keyframes iva-mt-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 820px) {
    .iva-mt-review-body {
        grid-template-columns: 1fr;
    }
    .iva-mt-session-list {
        max-height: 180px;
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }
}
