.main-content-container-background-webcam-test {
    background: #f3fafc;
}

.main-content-container-background-webcam-test > #main-content-container {
    background: transparent;
}

.webcam-test {
    max-width: 1160px;
    margin: 0 auto;
    padding: 40px 24px 64px;
    color: #213b45;
    font-size: 1rem;
}

.webcam-test-heading {
    max-width: 780px;
    margin-bottom: 28px;
}

.webcam-test .webcam-test-eyebrow {
    margin: 0 0 8px;
    color: #00758c;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.webcam-test h1 {
    margin: 0 0 14px;
    color: #173945;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
}

.webcam-test h2 {
    margin: 0 0 12px;
    color: #213b45;
    font-size: 1.4rem;
    line-height: 1.3;
}

.webcam-test h3 {
    margin: 0 0 10px;
    color: #213b45;
    font-size: 1.08rem;
    line-height: 1.4;
}

.webcam-test p {
    margin: 0 0 12px;
    line-height: 1.6;
    text-align: left;
}

.webcam-test-heading > p:not(.webcam-test-eyebrow) {
    font-size: 1.08rem;
}

.webcam-test-heading .webcam-test-privacy {
    color: #356054;
    font-size: .9rem !important;
}

.webcam-test-panel {
    padding: 28px;
    border: 1px solid #c7dde2;
    border-radius: 14px;
    background: white;
    box-shadow: 0 8px 24px #004e5f0c;
}

.webcam-test-controls {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .7fr);
    gap: 16px;
    margin-bottom: 10px;
}

.webcam-test-field label {
    display: block;
    margin-bottom: 6px;
    font-size: .85rem;
    font-weight: 650;
}

.webcam-test select {
    width: 100%;
    min-height: 46px;
    padding: 8px;
    border: 1px solid #9bb7bf;
    border-radius: 6px;
    color: #213b45;
    background: white;
    text-overflow: ellipsis;
}

.webcam-test select:disabled {
    background: #f3f6f7;
}

.webcam-test .webcam-test-hint {
    color: #52676f;
    font-size: .85rem;
    line-height: 1.5;
}

.webcam-test-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.webcam-test-actions > span {
    flex: 1 1 200px;
}

.webcam-test .webcam-test-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 11px 18px;
    border: 1px solid #00758c;
    border-radius: 7px;
    background: #00758c;
    color: white;
    font-size: .95rem;
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

.webcam-test .webcam-test-button-secondary {
    background: white;
    color: #00758c;
}

.webcam-test .webcam-test-button:hover:not(:disabled) {
    background: #00586a;
    color: white;
}

.webcam-test .webcam-test-button:disabled {
    opacity: .5;
    cursor: default;
}

.webcam-test :is(button, select, a):focus-visible {
    outline: 3px solid #c57808;
    outline-offset: 3px;
}

.webcam-test .webcam-test-status {
    padding: 12px 16px;
    border-radius: 6px;
    background: #edf6f8;
    font-size: .9rem;
}

.webcam-test .webcam-test-error {
    background: #fff0eb;
    color: #943b22;
}

.webcam-test-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    margin: 20px 0 16px;
}

.webcam-test-preview {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 9px;
    background: #142d37;
}

.webcam-test-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scaleX(-1);
}

.webcam-test-preview p {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    margin: 0;
    padding: 24px;
    text-align: center;
    color: #c3d5dc;
    background: #142d37;
}

.webcam-test [hidden] {
    display: none !important;
}

.webcam-test-readings h2 {
    font-size: 1.06rem;
}

.webcam-test-main-reading {
    color: #00758c;
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.webcam-test-unit {
    font-size: 1.2rem;
    font-weight: 500;
}

.webcam-test-live-readings {
    margin: 20px 0;
}

.webcam-test-live-readings > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px solid #e4edf0;
    font-size: .9rem;
}

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

.webcam-test progress {
    display: block;
    width: 100%;
    height: 9px;
    margin-top: 7px;
    accent-color: #00758c;
}

.webcam-test-device {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #c7dde2;
}

.webcam-test-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 28px;
    margin: 18px 0;
}

.webcam-test-details dt {
    margin-bottom: 3px;
    color: #52676f;
    font-size: .85rem;
}

.webcam-test-detail-wide {
    grid-column: 1 / -1;
}

.webcam-test-next {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px 36px;
    margin: 32px 0 44px;
    padding: 28px;
    border-left: 4px solid #00809b;
    background: #e2f1f4;
}

.webcam-test-next > div {
    flex: 1 1 460px;
}

.webcam-test-next p:last-child {
    margin-bottom: 0;
}

.webcam-test-guide-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 48px;
    margin-top: 24px;
}

.webcam-test-guide a {
    color: #00687d;
    text-underline-offset: 3px;
}

@media (max-width: 760px) {
    .webcam-test { padding: 28px 16px 40px; }
    .webcam-test-panel { padding: 20px; }
    .webcam-test-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .webcam-test-camera-field { grid-column: 1 / -1; }
    .webcam-test-workspace, .webcam-test-guide-columns { grid-template-columns: minmax(0, 1fr); }
    .webcam-test-next { padding: 22px; }
}

@media (max-width: 420px) {
    .webcam-test-panel { padding: 16px; }
    .webcam-test-controls, .webcam-test-details { grid-template-columns: minmax(0, 1fr); }
    .webcam-test-actions > button { flex: 1 1 auto; }
}
