/* ==========================================
   CERE 2027 - GLOBAL BRANDING
   pretalx 6.0.7
   ========================================== */

:root,
html,
body {
    --color-primary: #d40000 !important;
    --color-primary-event: #d40000 !important;
    --color-primary-lighter: #ffe5e5 !important;
    --bs-primary: #d40000;
}

/* Pulsanti principali */
.btn-primary,
.btn-success,
.btn-info {
    background-color: #d40000 !important;
    border-color: #d40000 !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus,
.btn-info:hover,
.btn-info:focus {
    background-color: #a90000 !important;
    border-color: #a90000 !important;
    color: #fff !important;
}

/* Pulsanti con bordo */
.btn-outline-primary,
.btn-outline-success,
.btn-outline-info {
    color: #d40000 !important;
    border-color: #d40000 !important;
}

.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-info:hover {
    background-color: #d40000 !important;
    color: #fff !important;
}

/* Link principali */
a:not(.btn) {
    color: var(--color-primary);
}

a:not(.btn):hover {
    color: #a90000;
}

/* Navbar e navigazione laterale */
.navbar {
    border-color: #d40000 !important;
}

.navbar-brand,
.navbar-brand:hover {
    color: #d40000 !important;
}

.sidebar .active,
.sidebar .nav-link.active,
.nav-link.active {
    border-color: #d40000;
}

/* Sfondi e accenti */
.bg-primary,
.bg-success,
.bg-info {
    background-color: #d40000 !important;
}

.text-primary,
.text-success,
.text-info {
    color: #d40000 !important;
}

.border-primary {
    border-color: #d40000 !important;
}

/* Badge */
.badge-primary {
    background-color: #d40000 !important;
}

/* Checkbox e radio */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #d40000;
}

/* Campi e focus */
.form-control:focus,
.form-select:focus {
    border-color: #d40000 !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 0, 0, .18);
}

/* Tab e paginazione */
.nav-tabs .nav-link.active {
    border-bottom-color: #d40000 !important;
}

.page-item.active .page-link {
    background-color: #d40000 !important;
    border-color: #d40000 !important;
}

/* Login */
body #wrapper {
    background-color: #d40000 !important;
}

/* Logo dashboard */
.navbar-brand img {
    max-height: 42px;
    max-width: 190px;
    width: auto;
    object-fit: contain;
}

/* Logo login */
#wrapper > .logo {
    max-width: 260px;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ============================================
   CERE 2027 - Accenti residui
   ============================================ */

/* Variabili aggiuntive Bootstrap */
:root,
html,
body {
    --color-primary: #d40000 !important;
    --color-primary-event: #d40000 !important;
    --color-primary-lighter: #ffe5e5 !important;
}

/* Colori informativi usati come accenti */
.btn-info,
.btn-info:hover,
.bg-info,
.badge-info {
    background-color: #d40000 !important;
    border-color: #d40000 !important;
    color: #fff !important;
}

/* Badge stato proposta */
.badge-primary,
.badge-info,
.label-primary,
.label-info {
    background-color: #d40000 !important;
    color: #fff !important;
}

/* Badge più chiari */
.badge-light,
.badge-secondary {
    border-color: #d40000;
}

/* Pulsanti nelle tabelle */
.table .btn-info,
.table .btn-primary {
    background-color: #d40000 !important;
    border-color: #d40000 !important;
    color: #fff !important;
}

/* Bordi e indicatori blu */
.border-info,
.border-primary {
    border-color: #d40000 !important;
}

/* Barre colorate nelle card degli eventi */
.event-card .bg-info,
.event-card .bg-success {
    background-color: #d40000 !important;
}

/* Elementi selezionati */
.list-group-item.active,
.dropdown-item.active {
    background-color: #d40000 !important;
    border-color: #d40000 !important;
    color: #fff !important;
}

/* Focus di navigazione */
.btn:focus-visible,
a:focus-visible {
    outline-color: #d40000;
}

/* ============================================
   CERE 2027 - Barre eventi e stati sessioni
   ============================================ */

/* Barre colorate delle schede eventi */
.event-list .bg-info,
.event-list .bg-success,
.event-card .bg-info,
.event-card .bg-success {
    background-color: #d40000 !important;
    border-color: #d40000 !important;
    color: #fff !important;
}

/* Indicatori blu/verde nelle card evento */
.event-list .btn-info,
.event-list .btn-success,
.event-card .btn-info,
.event-card .btn-success {
    background-color: #d40000 !important;
    border-color: #d40000 !important;
    color: #fff !important;
}

/* Pulsante dropdown dello stato delle sessioni */
.table .btn-info,
.table .btn-outline-info,
.table .btn-outline-primary {
    color: #d40000 !important;
    border-color: #d40000 !important;
    background-color: #fff !important;
}

/* Hover sui pulsanti stato */
.table .btn-info:hover,
.table .btn-outline-info:hover,
.table .btn-outline-primary:hover {
    color: #fff !important;
    background-color: #d40000 !important;
    border-color: #d40000 !important;
}

/* ============================================
   CERE 2027 - ACCENTI DASHBOARD E SUBMISSIONS
   ============================================ */

/* Stato SUBMITTED - da blu a rosso */
.submission-state-dropdown.submission-state-submitted {
    border-color: #d40000 !important;
    color: #d40000 !important;
}

.submission-state-dropdown.submission-state-submitted > summary.btn {
    border-color: #d40000 !important;
    color: #d40000 !important;
    background-color: #fff !important;
}

.submission-state-dropdown.submission-state-submitted > summary.btn:hover,
.submission-state-dropdown.submission-state-submitted > summary.btn:focus {
    background-color: #d40000 !important;
    border-color: #d40000 !important;
    color: #fff !important;
}

/* Icone e testo del pulsante submitted */
.submission-state-dropdown.submission-state-submitted > summary.btn i,
.submission-state-dropdown.submission-state-submitted > summary.btn h4 {
    color: inherit !important;
}

/* Barra blu - 4 proposals */
.dashboard-block-extension .dashboard-block-addon-info {
    background-color: #d40000 !important;
    border-color: #d40000 !important;
    color: #fff !important;
}

/* Barra verde - live */
.dashboard-block-extension .dashboard-block-addon-success {
    background-color: #8b0000 !important;
    border-color: #8b0000 !important;
    color: #fff !important;
}

/* Stato live e contenuto interno */
.dashboard-block-extension .dashboard-block-addon-success .state {
    background-color: transparent !important;
    color: #fff !important;
}

/* Hover delle barre */
.dashboard-block-extension .dashboard-block-addon-info:hover,
.dashboard-block-extension .dashboard-block-addon-success:hover {
    background-color: #a90000 !important;
    color: #fff !important;
}

/* ============================================
   CERE 2027 - Submission state dropdown
   Correzione contorno blu
   ============================================ */

details.submission-state-dropdown.submission-state-submitted {
    --submission-color-primary: #d40000 !important;
    --submission-color-secondary: #a90000 !important;

    background-image: repeating-linear-gradient(
        315deg,
        #d40000,
        #d40000 8px,
        #a90000 8px,
        #a90000 16px
    ) !important;
}

/* Pulsante interno */
details.submission-state-dropdown.submission-state-submitted > summary.btn {
    background-color: #ffffff !important;
    color: #d40000 !important;
    border-color: #d40000 !important;
}

/* Hover e focus */
details.submission-state-dropdown.submission-state-submitted > summary.btn:hover,
details.submission-state-dropdown.submission-state-submitted > summary.btn:focus {
    background-color: #ffe5e5 !important;
    color: #a90000 !important;
}
