/* Theme: the turquoise and slate of the Azimut logo, as on the loading screen. */
:root {
    --nc-teal: #1ba5a2;
    --nc-teal-light: #4cc4c0;
    --nc-teal-dark: #159290;
    --nc-slate: #5f6e78;
    --nc-bg-from: #ffffff;
    --nc-bg-to: #edf6f6;

    /* Radzen follows: buttons, focus, selection, dropdowns... */
    --rz-primary: var(--nc-teal);
    --rz-primary-light: var(--nc-teal-light);
    --rz-primary-lighter: #d3e9e8;
    --rz-primary-dark: var(--nc-teal-dark);
    --rz-secondary: var(--nc-slate);
    --rz-on-primary: #ffffff;
    --rz-on-secondary: #ffffff;
}

:root {
    --nc-text: #34414a;
    --nc-card: #ffffff;
    --nc-border: #dcecec;
    --nc-topbar: rgba(255, 255, 255, .6);
}

/* Dark: the browser decides (Radzen loads its own dark theme the same way, see index.html). */
@media (prefers-color-scheme: dark) {
    :root {
        --nc-bg-from: #1b2c2d;
        --nc-bg-to: #0f1818;
        --nc-text: #e2eeee;
        --nc-card: #1f3335;
        --nc-border: #2a4545;
        --nc-topbar: rgba(15, 24, 24, .7);
        --rz-primary-lighter: #1d4546;
    }
}

html, body {
    min-height: 100%;
    font-family: "Segoe UI", system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--nc-text);
}

body {
    background: radial-gradient(circle at 50% 0%, var(--nc-bg-from) 0%, var(--nc-bg-to) 100%) fixed;
}

/* Top bar: a thin turquoise line under it, like a signal. */
header.nc-topbar {
    padding-bottom: .5rem;
    margin-bottom: .75rem;
    border-bottom: 2px solid var(--nc-teal);
    background: var(--nc-topbar);
    backdrop-filter: blur(4px);
}

/* Cards: white, rounded, soft shadow. */
.rz-card,
.rz-card.rz-background-color-base-100 {
    background-color: var(--nc-card) !important;
}

.rz-card {
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(27, 165, 162, .12);
    border: 1px solid var(--nc-border);
}

/* Buttons: pill-shaped like the sign-in button. */
.rz-button {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: .03em;
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.rz-button:not(.rz-state-disabled):hover {
    transform: translateY(-1px);
    filter: brightness(.95);
    box-shadow: 0 4px 12px rgba(27, 165, 162, .28);
}

.rz-button:focus-visible {
    outline: 3px solid var(--nc-teal-light);
    outline-offset: 2px;
}

/* Dialogs: rounded, turquoise header, dimmed background. */
.rz-dialog-mask {
    background: rgba(24, 44, 46, .45);
    backdrop-filter: blur(2px);
}

.rz-dialog {
    border-radius: 16px;
    overflow: hidden;
    border: 0;
    box-shadow: 0 12px 40px rgba(15, 40, 42, .35);
}

.rz-dialog-titlebar {
    background: linear-gradient(90deg, var(--nc-teal) 0%, var(--nc-teal-light) 100%);
    color: #ffffff;
    border: 0;
}

.rz-dialog-titlebar .rz-dialog-title,
.rz-dialog-titlebar .rz-dialog-titlebar-close {
    color: #ffffff;
}

.rz-dialog-content {
    background: linear-gradient(180deg, var(--nc-bg-from) 0%, var(--nc-bg-to) 100%);
}

@media (prefers-reduced-motion: reduce) {
    .rz-button { transition: none; }
    .rz-button:hover { transform: none; }
}

/* Styles of the NoiseCalib pages. Hosts link this file next to app.css. */

.screen-sized {
    font-size: 15vw;
    line-height: 100%;
    text-align: center;
}

.clock {
    font-family: 'alarm clock';
    font-weight: normal;
    font-style: normal;
}

.tlarge {
    font-size: large;
}

.tlarger {
    font-size: larger;
}

.value {
    color: var(--nc-teal);
    font-weight: bold;
}

.sensitivity {
    font-size: xx-large;
    color: var(--nc-teal);
    font-weight: bold;
}

/* Status message: blinks without any component redraw. */
.information {
    font-size: larger;
    color: var(--nc-teal);
    font-weight: bold;
    animation: information-blink 1s steps(1, end) infinite;
}

@keyframes information-blink {
    0% { color: var(--nc-teal); }
    50% { color: var(--rz-base-100); }
}

/* Preview of the certificate in its dialog. */
.certificate-preview {
    max-height: 70vh;
    overflow: auto;
    padding: 8px;
    background: #8a8a8a;
}

.certificate-preview .certificate-sheet {
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Logo: transparent background, lightened on the dark theme so the slate letters stay readable. */
.nc-logo {
    background: transparent;
}

@media (prefers-color-scheme: dark) {
    .nc-logo {
        filter: brightness(1.7) saturate(1.1);
    }
}
