.oyp-analytics-consent[hidden] {
    display: none !important;
}

.oyp-analytics-consent {
    --oyp-consent-background: #ffffff;
    --oyp-consent-foreground: #172033;
    --oyp-consent-muted: #4b5568;
    --oyp-consent-border: #d8deea;
    --oyp-consent-primary: #ffa104;
    --oyp-consent-primary-hover: #d88700;
    --oyp-consent-on-primary: #ffffff;
    --oyp-consent-link: #b45309;
    --oyp-consent-secondary: #ffffff;
    --oyp-consent-focus: #d88700;
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: var(--oyp-consent-foreground);
    font-family: inherit;
    line-height: 1.5;
}

.oyp-analytics-consent__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    animation: oyp-consent-fade 200ms ease;
}

.oyp-analytics-consent__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(100%, 460px);
    max-height: calc(100vh - 32px);
    max-height: min(calc(100dvh - 32px), 760px);
    overflow: hidden;
    border: 1px solid var(--oyp-consent-border);
    border-radius: 16px;
    background: var(--oyp-consent-background);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.32);
    text-align: center;
    animation: oyp-consent-pop 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.oyp-analytics-consent__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 26px 24px 8px;
}

.oyp-analytics-consent__icon {
    margin: 0 auto 12px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 161, 4, 0.14);
    color: var(--oyp-consent-primary-hover);
    font-size: 1.5rem;
}

.oyp-analytics-consent__title {
    margin: 0 0 8px;
    color: var(--oyp-consent-foreground);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.oyp-analytics-consent__description {
    margin: 0 0 14px;
    color: var(--oyp-consent-muted);
    font-size: 0.93rem;
}

.oyp-analytics-consent__details {
    margin: 0 0 12px;
    text-align: left;
}

.oyp-analytics-consent__summary {
    cursor: pointer;
    color: var(--oyp-consent-link);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    list-style: none;
    padding: 4px 0;
}

.oyp-analytics-consent__summary::-webkit-details-marker {
    display: none;
}

.oyp-analytics-consent__summary::after {
    content: " ▾";
    font-size: 0.75rem;
}

.oyp-analytics-consent__details[open] .oyp-analytics-consent__summary::after {
    content: " ▴";
}

.oyp-analytics-consent__list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
    color: var(--oyp-consent-muted);
}

.oyp-analytics-consent__list li {
    padding: 7px 0;
    border-top: 1px solid var(--oyp-consent-border);
}

.oyp-analytics-consent__list li span {
    display: block;
    color: var(--oyp-consent-foreground);
    font-weight: 700;
    font-size: 0.86rem;
}

.oyp-analytics-consent__policy {
    margin: 0 0 18px;
    font-size: 0.85rem;
}

.oyp-analytics-consent__link {
    color: var(--oyp-consent-link);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.oyp-analytics-consent__actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 24px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--oyp-consent-border);
    background: var(--oyp-consent-background);
}

.oyp-cc-actions-primary {
    display: flex;
    gap: 10px;
}

.oyp-cc-actions-primary .oyp-analytics-consent__button {
    flex: 1 1 0;
}

.oyp-analytics-consent__button {
    flex: 1 1 0;
    min-height: 48px;
    padding: 12px 16px;
    border: 2px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.oyp-analytics-consent__button--accept {
    border-color: var(--oyp-consent-primary);
    color: var(--oyp-consent-on-primary);
    background: var(--oyp-consent-primary);
}

.oyp-analytics-consent__button--accept:hover {
    border-color: var(--oyp-consent-primary-hover);
    background: var(--oyp-consent-primary-hover);
}

.oyp-analytics-consent__button--reject {
    border-color: var(--oyp-consent-foreground);
    color: var(--oyp-consent-foreground);
    background: var(--oyp-consent-secondary);
}

.oyp-analytics-consent__button--reject:hover {
    background: #f3f5f9;
}

.oyp-analytics-consent__button--save {
    width: 100%;
    border-color: var(--oyp-consent-border);
    color: var(--oyp-consent-muted);
    background: var(--oyp-consent-background);
    font-size: 0.9rem;
}

.oyp-analytics-consent__button--save:hover {
    border-color: var(--oyp-consent-primary);
    color: var(--oyp-consent-foreground);
    background: rgba(255, 161, 4, 0.06);
}

.oyp-analytics-consent__button:focus-visible,
.oyp-analytics-consent__summary:focus-visible,
.oyp-analytics-consent__link:focus-visible {
    outline: 3px solid var(--oyp-consent-focus);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .oyp-analytics-consent {
        align-items: flex-end;
        padding: 0;
    }

    .oyp-analytics-consent__panel {
        width: 100%;
        max-height: 92vh;
        max-height: 92dvh;
        border-radius: 18px 18px 0 0;
        animation: oyp-consent-slide 240ms cubic-bezier(0.16, 1, 0.3, 1);
    }

    .oyp-analytics-consent__scroll {
        padding: 22px 18px 8px;
    }

    .oyp-analytics-consent__actions {
        padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

/* Kisa yukseklik / yatay (landscape) telefon: dikey alan az → kompakt + ic-scroll */
@media (max-height: 600px) {
    .oyp-analytics-consent {
        padding: 10px;
    }

    .oyp-analytics-consent__panel {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }

    .oyp-analytics-consent__scroll {
        padding-top: 16px;
    }

    .oyp-analytics-consent__icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
        font-size: 1.2rem;
    }

    .oyp-analytics-consent__title {
        font-size: 1.08rem;
        margin-bottom: 6px;
    }

    .oyp-analytics-consent__description {
        margin-bottom: 10px;
    }

    .oyp-cc-row {
        padding: 9px 12px;
    }

    .oyp-cc-row + .oyp-cc-row {
        margin-top: 8px;
    }
}

@media (max-height: 600px) and (min-width: 481px) {
    .oyp-analytics-consent {
        align-items: center;
    }
}

/* Cok kisa (yatay kucuk telefon ~360-430px yukseklik): ikonu gizle */
@media (max-height: 430px) {
    .oyp-analytics-consent__icon {
        display: none;
    }
}

@keyframes oyp-consent-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes oyp-consent-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes oyp-consent-slide {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media (prefers-color-scheme: dark) {
    .oyp-analytics-consent {
        --oyp-consent-background: #111827;
        --oyp-consent-foreground: #f8fafc;
        --oyp-consent-muted: #cbd5e1;
        --oyp-consent-border: #475569;
        --oyp-consent-primary: #ffb63b;
        --oyp-consent-primary-hover: #ffc266;
        --oyp-consent-on-primary: #172033;
        --oyp-consent-link: #ffc266;
        --oyp-consent-secondary: #1e293b;
        --oyp-consent-focus: #fbbf24;
    }

    .oyp-analytics-consent__button--reject:hover {
        background: #1e293b;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oyp-analytics-consent__button {
        transition: none;
    }

    .oyp-analytics-consent__backdrop,
    .oyp-analytics-consent__panel {
        animation: none;
    }
}

@media (forced-colors: active) {
    .oyp-analytics-consent__panel,
    .oyp-analytics-consent__button {
        border: 1px solid CanvasText;
    }
}

/* ===== Granuler consent: kategori satirlari + marka toggle-switch ===== */
.oyp-cc-cats {
    margin: 4px 0 16px;
    text-align: left;
}

.oyp-cc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--oyp-consent-border);
    border-radius: 12px;
    background: var(--oyp-consent-background);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.oyp-cc-row + .oyp-cc-row {
    margin-top: 10px;
}

.oyp-cc-row:hover {
    border-color: var(--oyp-consent-primary);
    box-shadow: 0 2px 10px rgba(17, 23, 38, .06);
}

.oyp-cc-row--locked {
    background: rgba(255, 161, 4, .06);
}

.oyp-cc-row--locked:hover {
    border-color: var(--oyp-consent-border);
    box-shadow: none;
}

.oyp-cc-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.oyp-cc-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--oyp-consent-foreground);
    line-height: 1.3;
}

.oyp-cc-desc {
    font-size: 12.5px;
    color: var(--oyp-consent-muted);
    line-height: 1.4;
}

.oyp-cc-switch {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.oyp-cc-switch input {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 44px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.oyp-cc-track {
    position: relative;
    display: block;
    width: 50px;
    height: 28px;
    border-radius: 999px;
    background: #c7cad1;
    transition: background-color .22s ease;
}

.oyp-cc-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(17, 23, 38, .28);
    transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}

.oyp-cc-state {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--oyp-consent-muted);
    letter-spacing: .2px;
    min-width: 34px;
    text-align: center;
}

.oyp-cc-state::after {
    content: "Kapalı";
}

.oyp-cc-switch input:checked ~ .oyp-cc-track {
    background: var(--oyp-consent-primary);
}

.oyp-cc-switch input:checked ~ .oyp-cc-track .oyp-cc-thumb {
    transform: translateX(22px);
}

.oyp-cc-switch input:checked ~ .oyp-cc-state {
    color: var(--oyp-consent-foreground);
}

.oyp-cc-switch input:checked ~ .oyp-cc-state::after {
    content: "Açık";
}

.oyp-cc-switch:hover input:not(:disabled) ~ .oyp-cc-track {
    background: #b4b8c0;
}

.oyp-cc-switch:hover input:checked:not(:disabled) ~ .oyp-cc-track {
    background: var(--oyp-consent-primary-hover);
}

.oyp-cc-switch input:active:not(:disabled) ~ .oyp-cc-track .oyp-cc-thumb {
    width: 26px;
}

.oyp-cc-switch input:focus-visible ~ .oyp-cc-track {
    outline: 3px solid var(--oyp-consent-focus);
    outline-offset: 2px;
}

.oyp-cc-switch input:disabled {
    cursor: not-allowed;
}

.oyp-cc-switch input:disabled ~ .oyp-cc-track {
    background: var(--oyp-consent-primary);
    opacity: .45;
}

.oyp-cc-switch input:disabled ~ .oyp-cc-track .oyp-cc-thumb {
    box-shadow: none;
}

.oyp-cc-pill {
    color: var(--oyp-consent-primary-hover);
    background: rgba(255, 161, 4, .16);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2px;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .oyp-cc-track,
    .oyp-cc-thumb {
        transition: none;
    }
}
