/*
 * The cookie notice of the platform (frontend/views/layouts/_cookie.php). The theme places `#cookies` as a bar at the
 * bottom; this lays out the buttons and the settings. The colours come from the theme (Bootstrap variables, buttons).
 */
#cookies.sp-consent p {
    text-align: left;
}

#cookies.sp-consent .sp-consent-title {
    display: block;
    margin-bottom: 0.2rem;
}

#cookies.sp-consent .sp-consent-bar,
#cookies.sp-consent .sp-consent-panel {
    max-width: 1080px;
    margin: 0 auto;
}

#cookies.sp-consent .sp-consent-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

#cookies.sp-consent .sp-consent-bar p {
    flex: 1 1 22rem;
    margin: 0;
}

#cookies.sp-consent .sp-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#cookies.sp-consent .sp-consent-buttons .btn,
#cookies.sp-consent .sp-consent-panel .btn {
    margin: 0;
}

#cookies.sp-consent .sp-consent-panel {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

#cookies.sp-consent .sp-consent-option {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* A theme can take the look of every input away (`appearance: none !important`): a box of 0 by 0 that no visitor sees.
   The boxes of the notice keep the look of the browser. */
#cookies.sp-consent .sp-consent-option input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    appearance: auto !important;
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0.2rem 0 0;
}

#cookies.sp-consent .sp-consent-option span strong {
    display: block;
}

.sp-consent-reopen {
    position: fixed;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 1030;
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--bs-body-color, #3a3a3a);
    background: var(--bs-body-bg, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0.85;
}

.sp-consent-reopen:hover,
.sp-consent-reopen:focus {
    opacity: 1;
}

@media (max-width: 576px) {
    #cookies.sp-consent .sp-consent-buttons .btn {
        flex: 1 1 100%;
    }
}
