/* ==========================================================================
   Hotspot Cookie Consent Banner
   PDPL-compliant, bilingual (EN/AR) with RTL mirror.
   Hard-coded hex (no var()) so it renders identically on app/client/admin layouts.
   ========================================================================== */

#hs-pdpl-notice {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 720px;
    z-index: 9998;
    font-family: "Cairo", "Inter", "Outfit", system-ui, sans-serif;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12), 0 4px 16px rgba(15, 23, 42, 0.06);
    box-sizing: border-box;
    overflow: hidden;
}

#hs-pdpl-notice[hidden] { display: none !important; }

#hs-pdpl-notice[data-mode="manage"] { max-width: 540px; }

#hs-pdpl-notice .hs-cc-inner { padding: 1.25rem 1.25rem; }
#hs-pdpl-notice .hs-cc-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#hs-pdpl-notice .hs-cc-title i { color: #FF4040; }
#hs-pdpl-notice .hs-cc-body {
    color: #64748b;
    margin: 0 0 1rem;
}
#hs-pdpl-notice .hs-cc-body a {
    color: #FF4040;
    text-decoration: underline;
}

/* Action row */
#hs-pdpl-notice .hs-cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}
#hs-pdpl-notice .hs-cc-btn {
    border: 0;
    border-radius: 9999px;
    padding: 0.65rem 1.2rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 150ms ease, transform 150ms ease;
}
#hs-pdpl-notice .hs-cc-btn:hover { opacity: 0.92; }
#hs-pdpl-notice .hs-cc-btn-primary {
    background: linear-gradient(135deg, #FF4040 0%, #FF6B6B 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 64, 64, 0.30);
}
#hs-pdpl-notice .hs-cc-btn-outline {
    background: transparent;
    color: #FF4040;
    border: 2px solid #FF4040;
    padding: 0.45rem 1.05rem;
}
#hs-pdpl-notice .hs-cc-btn-text {
    background: transparent;
    color: #0f172a;
    padding: 0.65rem 0.9rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Manage drawer (categories) */
#hs-pdpl-notice .hs-cc-categories {
    margin: 0.5rem 0 1rem;
    border-top: 1px solid #e2e8f0;
}
#hs-pdpl-notice .hs-cc-cat {
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}
#hs-pdpl-notice .hs-cc-cat:last-child { border-bottom: 0; }
#hs-pdpl-notice .hs-cc-cat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}
#hs-pdpl-notice .hs-cc-cat-name {
    font-weight: 600;
    color: #0f172a;
}
#hs-pdpl-notice .hs-cc-cat-desc {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
}
#hs-pdpl-notice .hs-cc-cat-list {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* Toggle switch */
#hs-pdpl-notice .hs-cc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
#hs-pdpl-notice .hs-cc-toggle input { display: none; }
#hs-pdpl-notice .hs-cc-toggle-slider {
    display: block;
    position: absolute;
    inset: 0;
    background: #e2e8f0;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 150ms ease;
}
#hs-pdpl-notice .hs-cc-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    background: #ffffff;
    border-radius: 9999px;
    transition: transform 150ms ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
#hs-pdpl-notice .hs-cc-toggle input:checked + .hs-cc-toggle-slider {
    background: #FF4040;
}
#hs-pdpl-notice .hs-cc-toggle input:checked + .hs-cc-toggle-slider::before {
    transform: translateX(20px);
}
/* Locked (essential) */
#hs-pdpl-notice .hs-cc-toggle--locked .hs-cc-toggle-slider {
    background: #10b981;
    cursor: not-allowed;
    opacity: 0.85;
}
#hs-pdpl-notice .hs-cc-toggle--locked .hs-cc-toggle-slider::before {
    transform: translateX(20px);
}

/* RTL mirror */
[dir="rtl"] #hs-pdpl-notice .hs-cc-toggle input:checked + .hs-cc-toggle-slider::before {
    transform: translateX(-20px);
}
[dir="rtl"] #hs-pdpl-notice .hs-cc-toggle--locked .hs-cc-toggle-slider::before {
    transform: translateX(-20px);
}
[dir="rtl"] #hs-pdpl-notice .hs-cc-actions { justify-content: flex-start; }

/* Mobile: full-width strip without rounded corners */
@media (max-width: 600px) {
    #hs-pdpl-notice {
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }
    #hs-pdpl-notice .hs-cc-actions {
        justify-content: stretch;
    }
    #hs-pdpl-notice .hs-cc-btn { flex: 1 1 auto; min-width: 30%; }
}

/* Back button (in Manage view, returns to initial banner view) */
#hs-pdpl-notice .hs-cc-back-row {
    margin: 0 0 0.75rem;
}
#hs-pdpl-notice .hs-cc-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 0;
    padding: 0.4rem 0.6rem;
    margin-inline-start: -0.6rem;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.5rem;
    font-family: inherit;
    transition: background 150ms ease, color 150ms ease;
}
#hs-pdpl-notice .hs-cc-btn-back:hover {
    background: #f1f5f9;
    color: #0f172a;
}
#hs-pdpl-notice .hs-cc-btn-back i { font-size: 0.85rem; }
[dir="rtl"] #hs-pdpl-notice .hs-cc-btn-back i.fa-arrow-left::before {
    content: "\f061"; /* fa-arrow-right — visually flips the chevron in RTL */
}

/* Footer link styling — inherits site footer styles, just prevent default link visited color */
#pdpl-settings-trigger {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
#pdpl-settings-trigger:hover { text-decoration: underline; }
