﻿/* =========================================================
   CONSENT
   ========================================================= */

.consent-banner,
.consent-preferences {
    font-family: inherit;
    color: inherit;
}


/* =========================================================
   CONSENT BANNER
   ========================================================= */

.consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    padding: 16px;
    pointer-events: none;
}

    .consent-banner[hidden] {
        display: none !important;
    }

.consent-banner__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.06);
    pointer-events: auto;
}

.consent-banner__content {
    flex: 1;
    min-width: 0;
}

.consent-banner__title {
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
}

.consent-banner__text {
    max-width: 780px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    color: #4b5563;
}

.consent-banner__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}


/* =========================================================
   CONSENT BUTTON
   ========================================================= */

.consent-button {
    min-height: 40px;
    padding: 9px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

    .consent-button:hover {
        transform: translateY(-1px);
    }

    .consent-button:active {
        transform: translateY(0);
    }

    .consent-button:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }


/* PRIMARY */

.consent-button--primary {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

    .consent-button--primary:hover {
        background: #000000;
        border-color: #000000;
    }


/* SECONDARY */

.consent-button--secondary {
    background: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

    .consent-button--secondary:hover {
        background: #f9fafb;
        border-color: #9ca3af;
    }


/* =========================================================
   PREFERENCES
   ========================================================= */

.consent-preferences {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

    .consent-preferences[hidden] {
        display: none !important;
    }

.consent-preferences__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(2px);
}

.consent-preferences__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 32px);
    max-width: 680px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}


/* =========================================================
   PREFERENCES HEADER
   ========================================================= */

.consent-preferences__header {
    padding: 22px 24px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.consent-preferences__title {
    margin-bottom: 5px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.consent-preferences__subtitle {
    max-width: 540px;
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
}

.consent-preferences__close {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-family: inherit;
    font-size: 25px;
    font-weight: 300;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .consent-preferences__close:hover {
        background: #f3f4f6;
        color: #111827;
    }


/* =========================================================
   PREFERENCES BODY
   ========================================================= */

.consent-preferences__body {
    flex: 1;
    overflow-y: auto;
}

.consent-preferences__item {
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid #f0f1f3;
}

    .consent-preferences__item:last-child {
        border-bottom: 0;
    }

.consent-preferences__item-content {
    flex: 1;
    min-width: 0;
}

.consent-preferences__item-title {
    margin-bottom: 5px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
}

.consent-preferences__item-text {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    color: #6b7280;
}

.consent-preferences__control {
    min-width: 110px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.consent-preferences__always-active {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: #4b5563;
}


/* =========================================================
   SWITCH
   ========================================================= */

.consent-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
    flex: 0 0 44px;
}

    .consent-switch input {
        width: 0;
        height: 0;
        opacity: 0;
    }

.consent-switch__slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

    .consent-switch__slider::before {
        content: "";
        position: absolute;
        left: 3px;
        top: 3px;
        width: 18px;
        height: 18px;
        background: #ffffff;
        border-radius: 50%;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
        transition: transform 0.18s ease;
    }

.consent-switch input:checked + .consent-switch__slider {
    background: #111827;
}

    .consent-switch input:checked + .consent-switch__slider::before {
        transform: translateX(20px);
    }

.consent-switch input:focus-visible + .consent-switch__slider {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.consent-switch input:disabled + .consent-switch__slider {
    opacity: 0.65;
    cursor: default;
}


/* =========================================================
   PREFERENCES FOOTER
   ========================================================= */

.consent-preferences__footer {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {

    .consent-banner {
        padding: 10px;
    }

    .consent-banner__inner {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .consent-banner__actions {
        justify-content: stretch;
    }

        .consent-banner__actions .consent-button {
            flex: 1 1 100%;
            width: 100%;
        }


    .consent-preferences__panel {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
    }

    .consent-preferences__header {
        padding: 18px;
    }

    .consent-preferences__item {
        padding: 18px;
        flex-direction: column;
        gap: 14px;
    }

    .consent-preferences__control {
        width: 100%;
        min-width: 0;
        justify-content: space-between;
    }

    .consent-preferences__footer {
        padding: 14px 18px;
        flex-direction: column;
        align-items: stretch;
    }

        .consent-preferences__footer .consent-button {
            width: 100%;
        }
}


/* =========================================================
   SMALL SCREEN
   ========================================================= */

@media (max-width: 480px) {

    .consent-banner__title {
        font-size: 15px;
    }

    .consent-banner__text {
        font-size: 13px;
    }

    .consent-preferences__title {
        font-size: 18px;
    }

    .consent-preferences__subtitle {
        font-size: 13px;
    }

    .consent-preferences__panel {
        border-radius: 12px;
    }
}

html.consent-modal-open,
html.consent-modal-open body {
    overflow: hidden;
}

.consent-button:disabled,
.consent-preferences__close:disabled {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}


/* =========================================================
   CONSENT BANNER - COMPACT
   ========================================================= */

/* DESKTOP */
@media (min-width: 992px) {

    .consent-banner {
        left: 12px;
        right: 175px; /* WhatsApp / Online Help için boşluk */
        bottom: 12px;
        padding: 0;
    }

    .consent-banner__inner {
        max-width: 1020px;
        padding: 10px 16px;
        gap: 16px;
        border-radius: 10px;
    }

    .consent-banner__title {
        font-size: 15px;
        margin-bottom: 3px;
    }

    .consent-banner__text {
        font-size: 13px;
        line-height: 1.4;
        max-width: 680px;
    }

    .consent-banner__actions {
        gap: 8px;
    }

        .consent-banner__actions .consent-button {
            min-height: 36px;
            padding: 8px 12px;
            font-size: 13px;
            white-space: nowrap;
        }
}

/* TABLET */
@media (min-width: 769px) and (max-width: 991px) {

    .consent-banner {
        right: 120px;
        padding: 10px;
    }

    .consent-banner__inner {
        padding: 12px;
        gap: 12px;
    }

    .consent-banner__text {
        font-size: 13px;
    }
}

/* MOBILE */
@media (max-width: 768px) {

    .consent-banner {
        padding: 8px;
    }

    .consent-banner__inner {
        padding: 12px;
        gap: 10px;
        border-radius: 10px;
    }

    .consent-banner__title {
        margin-bottom: 4px;
    }

    .consent-banner__text {
        line-height: 1.4;
    }

    .consent-banner__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

        .consent-banner__actions .consent-button {
            width: 100%;
            min-height: 38px;
            padding: 8px;
            font-size: 12px;
            white-space: normal;
        }
}

/* =========================================================
   CONSENT PREFERENCES - WIDER PANEL & BUTTON ALIGNMENT
   ========================================================= */

@media (min-width: 769px) {

    .consent-preferences__panel {
        max-width: 880px;
    }

    .consent-preferences__footer {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        padding: 14px 20px;
        align-items: stretch;
    }

        .consent-preferences__footer .consent-button {
            width: 100%;
            min-width: 0;
            min-height: 44px;
            padding: 9px 12px;
            font-size: 13px;
            line-height: 1.35;
            text-align: center;
            white-space: normal;
            overflow-wrap: break-word;
        }
}
