/**
 * KVKK / Aydınlatma — Normal modal (site yeşili ile uyum)
 */

/* Overlay + merkezleme */
.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.legal-modal.is-open {
    display: block;
}

.legal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.legal-modal__dialog {
    position: relative;
    height: 100%;
    width: 100%;
    display: grid;
    place-items: center;
    padding: clamp(12px, 4vw, 24px);
}

.legal-modal-lock {
    overflow: hidden !important;
}

.legal-popup {
    position: relative;
    box-sizing: border-box;
    width: min(100%, 640px);
    max-height: min(88vh, 720px);
    margin: 0 auto;
    padding: clamp(20px, 4vw, 28px) clamp(18px, 4vw, 28px) clamp(18px, 3vw, 24px);
    border-radius: 20px;
    background: #ffffff;
    color: #18191b;
    box-shadow:
        0 24px 48px rgba(15, 23, 42, 0.18),
        0 8px 16px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(22, 178, 84, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.legal-popup::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, #16b254, #12d966);
    pointer-events: none;
}

.legal-popup__close {
    position: absolute;
    top: 10px;
    right: clamp(8px, 2vw, 12px);
    z-index: 6;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.legal-popup__close:hover {
    background: #f0fdf4;
    color: #15803d;
    transform: scale(1.04);
}

.legal-popup__close:focus {
    outline: none;
}

.legal-popup__close:focus-visible {
    outline: 3px solid rgba(22, 178, 84, 0.45);
    outline-offset: 2px;
}

.legal-popup__close-icon {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

.legal-popup__inner {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    padding-top: 8px;
    padding-right: 40px;
}

@media (max-width: 480px) {
    .legal-popup__inner {
        padding-right: 36px;
    }
}

.legal-popup__title {
    margin: 0 0 14px;
    font-size: clamp(1.15rem, 2.8vw, 1.35rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #0f172a;
    flex-shrink: 0;
}

.legal-popup__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 6px;
    margin-right: -4px;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: rgba(24, 25, 27, 0.88);
}

.legal-popup__body p {
    margin: 0 0 0.85em;
}

.legal-popup__body p:last-child {
    margin-bottom: 0;
}

.legal-popup__body h3,
.legal-popup__body h4 {
    margin: 1.15em 0 0.5em;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.legal-popup__body h3:first-child,
.legal-popup__body h4:first-child {
    margin-top: 0;
}

.legal-popup__body ul {
    margin: 0.5em 0 1em;
    padding-left: 1.25em;
}

.legal-popup__body li {
    margin-bottom: 0.35em;
}

.legal-popup__body::-webkit-scrollbar {
    width: 8px;
}

.legal-popup__body::-webkit-scrollbar-track {
    background: rgba(22, 178, 84, 0.06);
    border-radius: 8px;
}

.legal-popup__body::-webkit-scrollbar-thumb {
    background: rgba(22, 178, 84, 0.35);
    border-radius: 8px;
}

.legal-popup__body::-webkit-scrollbar-thumb:hover {
    background: rgba(22, 178, 84, 0.5);
}
