/* ============================================================
   Gladiator Cookies — Cookie Consent Popup
   Position: fixed, centered at bottom of viewport
   Works on Elementor, Divi, any WordPress theme.
   ============================================================ */

/* ── POPUP WRAPPER ─────────────────────────────────────────── */
#gcc-popup {
    position: fixed;
    bottom: 32px;
    z-index: 999999;
    width: calc(100% - 40px);
    max-width: 620px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
    padding: 22px 24px;
    direction: rtl;
    font-family: -apple-system, 'Segoe UI', Arial, Helvetica, sans-serif;
    opacity: 0;
    transition: opacity .35s ease, transform .35s ease;
    border: 1.5px solid rgba(0, 0, 0, .07);
    /* Default position: center */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
}

#gcc-popup.gcc-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── POSITION VARIANTS ─────────────────────────────────────── */
#gcc-popup[data-position="bottom-left"] {
    left: 20px;
    right: auto;
    transform: translateY(20px);
    max-width: 420px;
}

#gcc-popup[data-position="bottom-left"].gcc-visible {
    transform: translateY(0);
}

#gcc-popup[data-position="bottom-right"] {
    right: 20px;
    left: auto;
    transform: translateY(20px);
    max-width: 420px;
}

#gcc-popup[data-position="bottom-right"].gcc-visible {
    transform: translateY(0);
}

/* ── STYLE: CLASSIC — full-width colored bar ───────────────── */
#gcc-popup[data-style="classic"] {
    bottom: 0;
    left: 0 !important;
    right: 0 !important;
    transform: translateY(20px) !important;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .12);
    padding: 14px 24px;
    border: none;
    background: var(--gcc-bg, #1a6b3c);
}

#gcc-popup[data-style="classic"].gcc-visible {
    transform: translateY(0) !important;
}

#gcc-popup[data-style="classic"] .gcc-popup-inner {
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

#gcc-popup[data-style="classic"] .gcc-popup-icon {
    display: none;
}

#gcc-popup[data-style="classic"] .gcc-popup-text {
    margin-bottom: 0;
    font-size: 13px;
}

#gcc-popup[data-style="classic"] .gcc-popup-buttons {
    flex-shrink: 0;
    flex-wrap: nowrap;
}

/* ── STYLE: FLOATING — compact card at position ────────────── */
#gcc-popup[data-style="floating"] {
    max-width: 360px;
    background: var(--gcc-bg, #1a6b3c);
}

/* ── STYLE: MODAL — centered overlay ──────────────────────── */
#gcc-popup[data-style="modal"] {
    bottom: auto;
    top: 50%;
    left: 50% !important;
    right: auto;
    transform: translate(-50%, -40%) !important;
    max-width: 420px;
}

#gcc-popup[data-style="modal"].gcc-visible {
    transform: translate(-50%, -50%) !important;
    opacity: 1;
}

/* Modal backdrop */
#gcc-banner-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 999998;
    animation: gcc-fade-in .3s ease;
}

#gcc-banner-bg.gcc-bg-visible {
    display: block;
}

/* ── STYLE: MINIMAL — thin bottom bar ──────────────────────── */
#gcc-popup[data-style="minimal"] {
    bottom: 0;
    left: 0 !important;
    right: 0 !important;
    transform: translateY(20px) !important;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .06);
    padding: 12px 24px;
    border: none;
    border-top: 3px solid var(--gcc-bg, #1a6b3c);
}

#gcc-popup[data-style="minimal"].gcc-visible {
    transform: translateY(0) !important;
}

#gcc-popup[data-style="minimal"] .gcc-popup-inner {
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

#gcc-popup[data-style="minimal"] .gcc-popup-icon {
    display: none;
}

#gcc-popup[data-style="minimal"] .gcc-popup-text {
    margin-bottom: 0;
    font-size: 13px;
}

#gcc-popup[data-style="minimal"] .gcc-popup-buttons {
    flex-shrink: 0;
}

/* ── INNER LAYOUT ──────────────────────────────────────────── */
.gcc-popup-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.gcc-popup-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.gcc-popup-content {
    flex: 1;
    min-width: 0;
}

/* ── TEXT ──────────────────────────────────────────────────── */
.gcc-popup-text {
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #333;
    font-weight: 400;
}

.gcc-policy-link {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}

.gcc-policy-link:hover {
    opacity: .75;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.gcc-popup-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gcc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .2s, opacity .2s, transform .15s;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.gcc-btn:focus-visible {
    outline: 3px solid rgba(0, 0, 0, .3);
    outline-offset: 2px;
}

/* Accept: filled */
.gcc-btn-accept {
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
}

.gcc-btn-accept:hover {
    opacity: .88;
    transform: translateY(-1px);
}

/* Reject: outline */
.gcc-btn-reject {
    background: transparent !important;
}

.gcc-btn-reject:hover {
    background: rgba(0, 0, 0, .05) !important;
}

/* Settings: text link style */
.gcc-btn-settings {
    background: transparent !important;
    border-color: transparent !important;
    padding: 9px 10px;
    text-decoration: underline;
    font-weight: 600;
    font-size: 12px;
}

.gcc-btn-settings:hover {
    opacity: .7;
}

/* Full-width button */
.gcc-btn-full {
    width: 100%;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
}

/* ── MODAL OVERLAY ─────────────────────────────────────────── */
#gcc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: gcc-fade-in .2s ease;
}

@keyframes gcc-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── MODAL BOX ─────────────────────────────────────────────── */
.gcc-modal-box {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    direction: rtl;
    font-family: -apple-system, 'Segoe UI', Arial, Helvetica, sans-serif;
    overflow: hidden;
    animation: gcc-slide-up .25s ease;
}

@keyframes gcc-slide-up {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gcc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1.5px solid #f0f0f0;
}

.gcc-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #111;
}

.gcc-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #888;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: background .15s;
}

.gcc-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.gcc-modal-body {
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
}

.gcc-modal-footer {
    padding: 14px 22px 20px;
    border-top: 1.5px solid #f0f0f0;
}

/* ── CATEGORY ITEMS ────────────────────────────────────────── */
.gcc-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    background: #fafafa;
}

.gcc-cat-disabled {
    opacity: .6;
}

.gcc-cat-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.gcc-cat-info strong {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.gcc-cat-info span {
    font-size: 11.5px;
    color: #777;
    line-height: 1.5;
}

/* ── TOGGLE SWITCH ─────────────────────────────────────────── */
.gcc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.gcc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.gcc-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: .3s;
    --accent: #1a6b3c;
}

.gcc-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.gcc-toggle input:checked+.gcc-slider {
    background: var(--accent, #1a6b3c);
}

.gcc-toggle input:checked+.gcc-slider::before {
    transform: translateX(20px);
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 500px) {
    #gcc-popup:not([data-style="classic"]):not([data-style="minimal"]):not([data-style="modal"]) {
        bottom: 0;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(20px) !important;
        width: 100%;
        max-width: 100%;
        border-radius: 18px 18px 0 0;
    }

    #gcc-popup:not([data-style="classic"]):not([data-style="minimal"]):not([data-style="modal"]).gcc-visible {
        transform: translateY(0) !important;
    }

    .gcc-popup-buttons {
        gap: 6px;
    }
}