/* Catforms.UI.Testing — student portal styles.
   Large tap targets, calm colors, readable defaults on Chromebooks/tablets. */

:root {
    --testing-accent: #2563a8;
}

body {
    background: #f6f8fa;
}

.testing-header {
    background: #fff;
    border-bottom: 1px solid #dde3e9;
}

.testing-main {
    max-width: 860px;
    font-size: 1.05rem;
}

/* ---- check-in ---- */
.checkin-body {
    background: #f6f8fa;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.checkin-panel {
    background: #fff;
    border: 1px solid #dde3e9;
    border-radius: 12px;
    padding: 2rem;
    width: min(440px, 92vw);
}

.checkin-code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 1.5rem;
    letter-spacing: 0.25rem;
    text-transform: uppercase;
    text-align: center;
}

/* ---- section timer ---- */
.section-timer {
    font-family: Consolas, "Courier New", monospace;
    font-size: 1.4rem;
    padding: 0.15rem 0.75rem;
    border-radius: 8px;
    background: #eef2f6;
}

.section-timer-warning {
    background: #fff3cd;
    color: #8a6d00;
}

/* ---- item palette ---- */
.item-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.palette-btn {
    min-width: 2.6rem;
    height: 2.6rem;
    border: 1px solid #c6cdd4;
    border-radius: 8px;
    background: #fff;
    font-weight: 600;
}

.palette-answered {
    background: #d9ecdb;
    border-color: #7fb98a;
}

.palette-current {
    outline: 3px solid var(--testing-accent);
}

/* ---- answer options ---- */
.option-btn {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    border: 2px solid #c6cdd4;
    border-radius: 10px;
    background: #fff;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.option-btn:hover {
    border-color: var(--testing-accent);
}

.option-selected {
    border-color: var(--testing-accent);
    background: #e7f0fa;
}

.option-key {
    font-weight: 700;
    min-width: 1.4rem;
}

.save-note {
    min-height: 1.4rem;
    font-size: 0.9rem;
}

/* Authored rich text: never let an oversized image break the layout. */
.item-html img {
    max-width: 100%;
    height: auto;
}

/* ---- Blazor reconnect dialog ---- */
#components-reconnect-modal {
    border: 1px solid #dde3e9;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

#components-reconnect-modal::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.components-reconnect-container p,
.components-reconnect-container button {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible {
    display: block;
}

#components-reconnect-modal.components-reconnect-failed button.components-reconnect-failed-visible,
#components-reconnect-modal.components-reconnect-paused button.components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed button.components-resume-failed-visible {
    display: inline-block;
    margin-top: 0.5rem;
}

.components-rejoining-animation {
    display: inline-block;
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.components-rejoining-animation div {
    position: absolute;
    border: 3px solid var(--testing-accent);
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    inset: 0;
}

.components-rejoining-animation div:nth-child(2) {
    animation-delay: -0.75s;
}

@keyframes components-rejoining-animation {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}
