/* Consent (cookie preferences) widget */
:root {
    --consent-accent: #1a5fb4;
    --consent-size: 56px;
    /* Floating stack on the left: WhatsApp (20px + ~64px). Katalog butonu WhatsApp ile bu buton arasinda. */
    --consent-bottom: 164px;
}

.consent-fab {
    position: fixed;
    left: 24px;
    bottom: var(--consent-bottom);
    width: var(--consent-size);
    height: var(--consent-size);
    border: 0;
    border-radius: 50%;
    background: var(--consent-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
    z-index: 99998;
    transition: transform .2s ease, box-shadow .2s ease;
}
.consent-fab:hover { transform: scale(1.08); box-shadow: 0 6px 14px rgba(0, 0, 0, .32); }
.consent-fab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--consent-accent); }
.consent-fab svg { width: 28px; height: 28px; }

.consent-fab .consent-tip {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    font: 600 13px/1 'Montserrat', Arial, sans-serif;
    padding: 9px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.consent-fab:hover .consent-tip,
.consent-fab:focus-visible .consent-tip { opacity: 1; }

/* Overlay + dialog */
.consent-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}
.consent-overlay.is-open { opacity: 1; visibility: visible; }

.consent-dialog {
    background: #fff;
    color: #222;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
    font-family: 'Montserrat', Arial, sans-serif;
    transform: translateY(0) scale(1);
    transform-origin: var(--consent-ox, 0%) var(--consent-oy, 100%);
    transition: transform .55s cubic-bezier(.65, 0, .35, 1), opacity .55s ease;
}
/* Closing: shrink toward the left button */
.consent-overlay.is-closing .consent-dialog {
    transform: translate(var(--consent-dx, -40vw), var(--consent-dy, 40vh)) scale(.05);
    opacity: 0;
}
.consent-overlay.is-closing { transition: opacity .55s ease .1s, visibility .65s; opacity: 0; }

.consent-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #e5e5e5;
}
.consent-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.consent-x { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: #666; padding: 4px 8px; }

.consent-body { padding: 16px 20px; overflow-y: auto; font-size: 14px; line-height: 1.6; }
.consent-body p { margin: 0 0 10px; }
.consent-more { color: var(--consent-accent); background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.consent-extra[hidden] { display: none; }

.consent-cat { border-top: 1px solid #e5e5e5; padding: 12px 0; }
.consent-cat-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consent-cat strong { font-size: 15px; }
.consent-cat p { margin: 6px 0 0; color: #555; font-size: 13px; }
.consent-always { color: #1a8a1a; font-weight: 700; font-size: 13px; }

.consent-switch { position: relative; width: 42px; height: 24px; flex: none; }
.consent-switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.consent-switch span { position: absolute; inset: 0; background: #bbb; border-radius: 24px; transition: background .2s; }
.consent-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.consent-switch input:checked + span { background: var(--consent-accent); }
.consent-switch input:checked + span::after { transform: translateX(18px); }
.consent-switch input:focus-visible + span { outline: 3px solid var(--consent-accent); outline-offset: 2px; }

.consent-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid #e5e5e5; }
.consent-foot button {
    flex: 1; padding: 11px 8px; border-radius: 5px; font: 600 14px 'Montserrat', Arial, sans-serif; cursor: pointer;
    border: 2px solid var(--consent-accent); background: #fff; color: var(--consent-accent);
}
.consent-foot .consent-accept { background: var(--consent-accent); color: #fff; }

@media (max-width: 600px) {
    .consent-foot { flex-direction: column; }
    .consent-fab { left: 27px; --consent-size: 50px; }
}
@media (prefers-reduced-motion: reduce) {
    .consent-dialog, .consent-overlay, .consent-fab { transition: none; }
}
