/* Cookie banner. Own namespace (.buda-cc), independent of Bootstrap and the portal themes. */

.buda-cc,
.buda-cc * {
    box-sizing: border-box;
}

.buda-cc[hidden],
.buda-cc [hidden],
.buda-cc__fab[hidden] {
    display: none !important;
}

.buda-cc {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483000;
    max-width: 780px;
    max-height: calc(100vh - 32px);
    margin: 0 auto;
    padding: 20px 22px;
    overflow-y: auto;
    background: #ffffff;
    color: #1b2430;
    border: 1px solid #d9e1ea;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(18, 38, 63, 0.28);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

.buda-cc__title:focus {
    outline: none;
}

.buda-cc__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #1b2430;
}

.buda-cc__text {
    margin: 0 0 10px;
    color: #354052;
}

.buda-cc__link {
    color: #0b3d91;
    text-decoration: underline;
}

.buda-cc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* "Accept" and "Necessary only" look the same on purpose: no choice is pushed. */
.buda-cc__btn {
    flex: 1 1 160px;
    min-height: 42px;
    padding: 9px 16px;
    border: 2px solid #070b3a;
    border-radius: 8px;
    background: #070b3a;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.buda-cc__btn:hover,
.buda-cc__btn:focus-visible {
    background: #1a2170;
    border-color: #1a2170;
}

.buda-cc__btn--outline {
    background: #ffffff;
    color: #070b3a;
}

.buda-cc__btn--outline:hover,
.buda-cc__btn--outline:focus-visible {
    background: #eef1fb;
    border-color: #070b3a;
}

.buda-cc__btn:focus-visible,
.buda-cc__fab:focus-visible,
.buda-cc__link:focus-visible,
.buda-cc__switch input:focus-visible {
    outline: 3px solid #f5a623;
    outline-offset: 2px;
}

.buda-cc__group {
    margin: 14px 0;
    padding: 14px 16px;
    border: 1px solid #d9e1ea;
    border-radius: 10px;
    background: #f7f9fc;
}

.buda-cc__group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.buda-cc__group-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1b2430;
}

.buda-cc__badge {
    flex: none;
    padding: 2px 10px;
    border-radius: 999px;
    background: #dff3e4;
    color: #17602a;
    font-size: 12px;
    font-weight: 600;
}

.buda-cc__badge--optional {
    background: #e8ecf5;
    color: #3a4660;
}

.buda-cc__list {
    margin: 0 0 10px;
    padding-left: 18px;
    color: #354052;
}

.buda-cc__switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 0;
    font-weight: 600;
    cursor: pointer;
}

.buda-cc__switch input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #070b3a;
    cursor: pointer;
}

/* Small button to open the settings again (pages without the legal footer). */
.buda-cc__fab {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 2147482000;
    padding: 6px 12px;
    border: 1px solid #d9e1ea;
    border-radius: 999px;
    background: #ffffff;
    color: #1b2430;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(18, 38, 63, 0.18);
}

.buda-cc__fab:hover {
    background: #eef1fb;
}

/* Place of an external map service that needs consent (see BudaConsent.guard). */
.buda-cc-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 160px;
    padding: 20px;
    border: 1px dashed #b4c0d1;
    border-radius: 10px;
    background: #f7f9fc;
    color: #354052;
    text-align: center;
}

.buda-cc-placeholder .buda-cc__btn {
    flex: none;
}

/* Footer link of the portals */
.buda-cc-footer-link {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

@media (max-width: 575px) {
    .buda-cc {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 16px;
    }

    .buda-cc__btn {
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .buda-cc {
        animation: buda-cc-in 0.2s ease-out;
    }

    @keyframes buda-cc-in {
        from {
            opacity: 0;
            transform: translateY(12px);
        }
        to {
            opacity: 1;
            transform: none;
        }
    }
}
