/* Cookie consent banner & preferences modal (standalone — works without Bootstrap) */

.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    background: linear-gradient(135deg, #162032 0%, #122a44 100%);
    color: #fff;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

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

.cookie-consent__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    max-width: 1140px;
    margin: 0 auto;
}

.cookie-consent__text {
    flex: 1 1 320px;
}

.cookie-consent__title {
    color: #fff;
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.cookie-consent__body {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.cookie-consent__body a {
    color: #93c5fd;
}

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

.cookie-consent__manage {
    text-decoration: underline;
    color: #fff;
    background: none;
    border: 0;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.35rem 0.5rem;
}

.cookie-consent .btn,
.cookie-modal .btn {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.cookie-consent .btn-primary,
.cookie-modal .btn-primary {
    background: #2c7be5;
    border-color: #2c7be5;
    color: #fff;
}

.cookie-consent .btn-outline-light {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.cookie-modal .btn-outline-secondary {
    background: #fff;
    border-color: #cbd5e1;
    color: #334155;
}

.cookie-modal[hidden] {
    display: none !important;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

body.cookie-modal-open {
    overflow: hidden;
}

.cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.cookie-modal__panel {
    position: relative;
    width: min(520px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    color: #334155;
}

.cookie-modal__header,
.cookie-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.cookie-modal__footer {
    border-bottom: 0;
    border-top: 1px solid #e2e8f0;
    justify-content: flex-end;
}

.cookie-modal__body {
    padding: 1rem 1.25rem;
}

.cookie-modal__header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.cookie-modal .btn-close {
    width: 1rem;
    height: 1rem;
    border: 0;
    background: transparent;
    opacity: 0.55;
    cursor: pointer;
    position: relative;
}

.cookie-modal .btn-close::before,
.cookie-modal .btn-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #334155;
}

.cookie-modal .btn-close::before {
    transform: rotate(45deg);
}

.cookie-modal .btn-close::after {
    transform: rotate(-45deg);
}

.cookie-pref-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid #edf2f9;
}

.cookie-pref-item:last-child {
    border-bottom: 0;
}

.cookie-pref-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.cookie-modal .text-muted {
    color: #64748b;
}

.cookie-modal .small {
    font-size: 0.875rem;
}

.cookie-modal .badge {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    background: #64748b;
    color: #fff;
}

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

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

    .cookie-consent__actions .btn {
        flex: 1 1 auto;
    }
}
