/* Cookie Consent Banner – Noorzad Properties */

.cookie-consent {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    padding: 16px;
    pointer-events: none;
    transform: translateY(110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease, visibility 0.35s ease;
}

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

.cookie-consent.is-visible {
    pointer-events: auto;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cookie-consent__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 28px;
    background: rgba(21, 21, 21, 0.97);
    border: 1px solid rgba(188, 155, 115, 0.25);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.cookie-consent__title {
    font-family: 'Optima', 'DM Sans', sans-serif;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 500;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: 0.02em;
}

.cookie-consent__text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
}

.cookie-consent__text a {
    color: var(--cr-gold1, #BC9B73);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__text a:hover {
    color: #d4b896;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-consent__btn {
    font-family: 'Optima', 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    white-space: nowrap;
}

.cookie-consent__btn--primary {
    background-color: var(--cr-gold1, #BC9B73);
    color: #151515;
    border-color: var(--cr-gold1, #BC9B73);
}

.cookie-consent__btn--primary:hover {
    background-color: #d4b896;
    border-color: #d4b896;
}

.cookie-consent__btn--secondary {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.2);
}

.cookie-consent__btn--secondary:hover {
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.cookie-consent__btn--outline {
    background-color: transparent;
    color: var(--cr-gold1, #BC9B73);
    border-color: rgba(188, 155, 115, 0.45);
}

.cookie-consent__btn--outline:hover {
    background-color: rgba(188, 155, 115, 0.12);
}

/* Preferences Modal */

.cookie-preferences {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.cookie-preferences.is-visible {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.cookie-preferences__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.cookie-preferences__panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: #151515;
    border: 1px solid rgba(188, 155, 115, 0.25);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.cookie-preferences__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cookie-preferences__title {
    font-family: 'Optima', 'DM Sans', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: #fff;
    margin: 0;
}

.cookie-preferences__close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s ease;
}

.cookie-preferences__close:hover {
    color: #fff;
}

.cookie-preferences__intro {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 24px;
}

.cookie-preferences__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.cookie-pref-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-pref-item__name {
    font-family: 'Optima', 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 4px;
}

.cookie-pref-item__desc {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

.cookie-pref-item__badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cr-gold1, #BC9B73);
    padding: 6px 10px;
    border: 1px solid rgba(188, 155, 115, 0.35);
    border-radius: 4px;
}

.cookie-preferences__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

/* Toggle Switch */

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle__slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 26px;
    transition: background-color 0.25s ease;
}

.cookie-toggle__slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
}

.cookie-toggle input:checked + .cookie-toggle__slider {
    background: var(--cr-gold1, #BC9B73);
}

.cookie-toggle input:checked + .cookie-toggle__slider::before {
    transform: translateX(22px);
}

.cookie-toggle input:focus-visible + .cookie-toggle__slider {
    outline: 2px solid var(--cr-gold1, #BC9B73);
    outline-offset: 2px;
}

/* Footer cookie settings link */

.footer-cookie-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-cookie-link:hover {
    color: var(--cr-gold1, #BC9B73);
}

/* Responsive */

@media (max-width: 991px) {
    .cookie-consent__inner {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .cookie-consent__actions {
        justify-content: stretch;
    }

    .cookie-consent__btn {
        flex: 1 1 auto;
        text-align: center;
        min-width: 0;
        white-space: normal;
    }
}

@media (max-width: 575px) {
    .cookie-consent {
        padding: 12px;
    }

    .cookie-consent__actions {
        flex-direction: column;
    }

    .cookie-preferences__panel {
        padding: 20px;
    }

    .cookie-preferences__actions {
        flex-direction: column;
    }

    .cookie-preferences__actions .cookie-consent__btn {
        width: 100%;
        text-align: center;
    }
}
