/* PWA/mobile: esperienza cromatica deterministica in modalità chiara. */
:root {
    color-scheme: light;
}

/* La shell installata deve restare chiara indipendentemente dal tema del dispositivo. */
html[data-app-context="native"],
html[data-app-context="standalone"],
html[data-app-context="native"] body,
html[data-app-context="standalone"] body {
    color-scheme: light !important;
}

html[data-app-context="native"] body,
html[data-app-context="standalone"] body {
    background: #f3f6f9 !important;
    color: #17324d !important;
}

html[data-app-context="native"] .rcd-panel,
html[data-app-context="standalone"] .rcd-panel,
html[data-app-context="native"] .card,
html[data-app-context="standalone"] .card,
html[data-app-context="native"] .modal-content,
html[data-app-context="standalone"] .modal-content,
html[data-app-context="native"] .form-control,
html[data-app-context="standalone"] .form-control,
html[data-app-context="native"] .form-select,
html[data-app-context="standalone"] .form-select {
    background-color: #fff !important;
    color: #17324d !important;
}

html[data-app-context="native"] .form-control,
html[data-app-context="standalone"] .form-control,
html[data-app-context="native"] .form-select,
html[data-app-context="standalone"] .form-select {
    border-color: #b8c6d1 !important;
}

html[data-app-context="native"] .text-muted,
html[data-app-context="standalone"] .text-muted,
html[data-app-context="native"] .form-text,
html[data-app-context="standalone"] .form-text {
    color: #52606d !important;
}

/* Barra inferiore PWA/native: blu istituzionale del Registro. */
html[data-app-context="native"] .rcd-app-bottom-nav,
html[data-app-context="standalone"] .rcd-app-bottom-nav {
    background: rgb(10, 42, 77) !important;
    border-top: 1px solid rgb(93, 202, 220) !important;
    box-shadow: 0 -8px 24px rgba(10, 42, 77, .24) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.rcd-app-bottom-nav a {
    color: rgba(255, 255, 255, .82) !important;
}

.rcd-app-bottom-nav a:hover,
.rcd-app-bottom-nav a:focus-visible {
    color: #fff !important;
    background: rgba(93, 202, 220, .12) !important;
}

.rcd-app-bottom-nav a.active,
.rcd-app-bottom-nav a[aria-current="page"] {
    color: rgb(93, 202, 220) !important;
    background: rgba(93, 202, 220, .14) !important;
}

.rcd-app-bottom-nav a.active::before,
.rcd-app-bottom-nav a[aria-current="page"]::before {
    background: rgb(93, 202, 220) !important;
}

/* Evita che controlli nativi Android/iOS ereditino una palette scura. */
html[data-app-context="native"] input,
html[data-app-context="native"] textarea,
html[data-app-context="native"] select,
html[data-app-context="native"] button,
html[data-app-context="standalone"] input,
html[data-app-context="standalone"] textarea,
html[data-app-context="standalone"] select,
html[data-app-context="standalone"] button {
    color-scheme: light !important;
}
