.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    background: #fff;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, .15);
    padding: 16px 0;
}

.cookie-consent[hidden] {
    display: none;
}

/* The open banner stays above modal windows (1080 > 1050), so the space it takes
   (--ffj-cookie-consent-h, set by the banner script) is kept clear: a modal form
   ends above the banner instead of hiding its submit button and consent checkbox
   under it, and keyboard focus scrolls fields into the visible part of the screen. */
html {
    scroll-padding-bottom: var(--ffj-cookie-consent-h, 0px);
}

.modal {
    padding-bottom: var(--ffj-cookie-consent-h, 0px);
    scroll-padding-bottom: var(--ffj-cookie-consent-h, 0px);
}

/* Bootstrap centres .modal-dialog-centered against the full screen height (100vh). */
.modal-dialog-centered::before {
    height: calc(100vh - 1rem - var(--ffj-cookie-consent-h, 0px));
}

@media (min-width: 576px) {
    .modal-dialog-centered::before {
        height: calc(100vh - 3.5rem - var(--ffj-cookie-consent-h, 0px));
    }
}

.cookie-consent__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-consent__text {
    flex: 1 1 420px;
    color: #111;
    font-size: .95rem;
    line-height: 1.5;
}

.cookie-consent__title {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.cookie-consent__desc {
    margin: 0;
}

.cookie-consent__link {
    text-decoration: underline;
    white-space: nowrap;
}

.cookie-consent__actions {
    display: flex;
    gap: 12px;
    flex: 0 0 auto;
}

/* Accept and Reject are styled to equal prominence (same size/weight), as
   required by the AEPD — only the colour differs. */
.cookie-consent__btn {
    min-width: 130px;
    padding: 10px 22px;
    border-radius: 4px;
    border: 2px solid transparent;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.cookie-consent__btn--accept {
    background: var(--ffj-red-01, #ed4941);
    color: #fff;
}

.cookie-consent__btn--accept:hover,
.cookie-consent__btn--accept:focus {
    background: var(--ffj-red-02, #d83a32);
}

.cookie-consent__btn--reject {
    background: #fff;
    color: #111;
    border-color: #111;
}

.cookie-consent__btn--reject:hover,
.cookie-consent__btn--reject:focus {
    background: #111;
    color: #fff;
}

@media (max-width: 575px) {
    .cookie-consent__actions {
        width: 100%;
    }

    .cookie-consent__btn {
        flex: 1 1 0;
        min-width: 0;
    }
}
