/* Esdeh Legal — Cookie Banner */

.esdeh-legal-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
    border-top: 1px solid #e5e5e5;
    transform: translateY(0);
    transition: transform 280ms ease;
    font-family: inherit;
}

.esdeh-legal-banner.esdeh-legal--hidden {
    transform: translateY(120%);
    pointer-events: none;
}

.esdeh-legal-banner__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 22px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.esdeh-legal-banner__text {
    flex: 1 1 460px;
    min-width: 280px;
}

.esdeh-legal-banner__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #1a1a1a;
}

.esdeh-legal-banner__msg {
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0;
    color: #444;
}

.esdeh-legal-banner__link {
    color: #c8102e;
    text-decoration: underline;
    margin-left: 4px;
}

.esdeh-legal-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.esdeh-legal-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 80ms ease;
    line-height: 1.2;
    white-space: nowrap;
}

.esdeh-legal-btn:active { transform: translateY(1px); }

.esdeh-legal-btn--primary {
    background: #c8102e;
    color: #fff;
    border-color: #c8102e;
}
.esdeh-legal-btn--primary:hover { background: #a30c24; border-color: #a30c24; }

.esdeh-legal-btn--outline {
    background: transparent;
    color: #1a1a1a;
    border-color: #d4d4d4;
}
.esdeh-legal-btn--outline:hover { border-color: #1a1a1a; }

.esdeh-legal-btn--ghost {
    background: transparent;
    color: #555;
    border-color: transparent;
    text-decoration: underline;
}
.esdeh-legal-btn--ghost:hover { color: #1a1a1a; }

/* Modal */
.esdeh-legal-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.esdeh-legal-modal.esdeh-legal--open { display: flex; }

.esdeh-legal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

.esdeh-legal-modal__panel {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: esdeh-legal-pop 220ms ease;
}

@keyframes esdeh-legal-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.esdeh-legal-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #ececec;
}
.esdeh-legal-modal__header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.esdeh-legal-modal__close {
    background: none;
    border: 0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
}
.esdeh-legal-modal__close:hover { color: #000; }

.esdeh-legal-modal__body {
    padding: 18px 22px;
    overflow-y: auto;
}

.esdeh-legal-modal__intro {
    font-size: 13.5px;
    color: #555;
    margin: 0 0 16px;
    line-height: 1.55;
}

.esdeh-legal-cat {
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fafafa;
}

.esdeh-legal-cat__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
}

.esdeh-legal-cat__label { flex: 1; }
.esdeh-legal-cat__label strong { display: block; font-size: 14px; margin-bottom: 4px; }
.esdeh-legal-cat__desc { font-size: 12.5px; color: #666; line-height: 1.5; }

.esdeh-legal-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}
.esdeh-legal-switch input { opacity: 0; width: 0; height: 0; }
.esdeh-legal-switch__slider {
    position: absolute;
    inset: 0;
    background: #cfcfcf;
    border-radius: 24px;
    transition: background 160ms ease;
}
.esdeh-legal-switch__slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 160ms ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.esdeh-legal-switch input:checked + .esdeh-legal-switch__slider { background: #c8102e; }
.esdeh-legal-switch input:checked + .esdeh-legal-switch__slider::before { transform: translateX(20px); }
.esdeh-legal-switch input:disabled + .esdeh-legal-switch__slider { background: #b8b8b8; opacity: 0.7; cursor: not-allowed; }

.esdeh-legal-modal__footer {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid #ececec;
    background: #fafafa;
}

@media (max-width: 640px) {
    .esdeh-legal-banner__inner { padding: 16px; gap: 14px; }
    .esdeh-legal-banner__actions { width: 100%; }
    .esdeh-legal-btn { flex: 1 1 auto; padding: 12px 14px; font-size: 13px; }
    .esdeh-legal-modal__footer .esdeh-legal-btn { flex: 1 1 100%; }
}
