/**
 * EMAD Perii — Banner & modal consimțământ cookie-uri
 */

.cookie-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
    background: linear-gradient(180deg, rgba(15, 76, 129, 0.97) 0%, rgba(10, 55, 95, 0.98) 100%);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 -8px 32px rgba(15, 76, 129, 0.25);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
    pointer-events: none;
    padding-bottom: env(safe-area-inset-bottom);
}

.cookie-bar:not([hidden]) {
    pointer-events: auto;
}

.cookie-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1rem 0;
}

.cookie-bar__text {
    flex: 1 1 280px;
    min-width: 0;
}

.cookie-bar__message {
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.95);
}

.cookie-bar__links {
    margin-top: 0.35rem;
    font-size: 0.75rem;
}

.cookie-bar__links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.cookie-bar__links a:hover {
    color: #fff;
    text-decoration: underline;
}

.cookie-bar__links span {
    margin: 0 0.35rem;
    opacity: 0.45;
}

.cookie-bar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-bar__btn-settings,
.cookie-bar__btn-reject {
    border-color: rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
    white-space: nowrap;
}

.cookie-bar__btn-settings:hover,
.cookie-bar__btn-reject:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #fff !important;
}

.cookie-bar__btn-accept {
    white-space: nowrap;
    font-weight: 600;
}

/* Offset conținut + sticky CTA când bara e vizibilă */
body.has-cookie-banner {
    padding-bottom: var(--cookie-banner-h, 0px);
}

body.has-cookie-banner.has-sticky-cta .sticky-cta-bar {
    bottom: calc(var(--cookie-banner-h, 0px) + 0.5rem);
}

@media (min-width: 992px) {
    body.has-cookie-banner.has-sticky-cta {
        padding-bottom: 0;
    }
    body.has-cookie-banner.has-sticky-cta .sticky-cta-bar {
        bottom: calc(var(--cookie-banner-h, 0px) + 1rem);
    }
}

/* Modal preferințe */
.cookie-modal .modal-content {
    border: none;
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 20px 48px rgba(15, 76, 129, 0.18);
}

.cookie-modal .modal-title {
    color: var(--color-primary);
    font-weight: 600;
}

.cookie-category {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.cookie-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cookie-category__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-category .form-check-input {
    width: 2.5em;
    height: 1.25em;
    cursor: pointer;
}

.cookie-category .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.footer-legal__settings {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: color 0.2s;
}

.footer-legal__settings:hover {
    color: var(--color-white);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 575.98px) {
    .cookie-bar__inner {
        padding: 0.85rem 0;
    }

    .cookie-bar__actions {
        width: 100%;
    }

    .cookie-bar__actions .btn {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 44px;
    }

    .cookie-bar__btn-accept {
        flex: 1 1 100%;
        order: -1;
    }
}
