/* =========================================
   GS Cookie Consent - Styles
   ========================================= */

/* --- 1. Accessibility Utilities (חובה) --- */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- 2. Main Banner --- */
.gscc-banner {
    position: fixed;
    bottom: 1rem;
    inset-inline: 1rem; /* תמיכה ב-RTL אוטומטי */
    z-index: 99999;
    background: #111827;
    color: #f9fafb;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    max-width: 700px;
    margin-inline: auto;
    direction: rtl; /* אוטומטי לעברית */
    box-sizing: border-box;

    /* אנימציית כניסה עדינה */
    animation: gscc-fade-in 0.3s ease-out;
}

@keyframes gscc-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gscc-banner__text {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.gscc-banner__policy {
    margin-bottom: 0.75rem;
    font-size: 13px;
}

.gscc-banner__policy a {
    color: #93c5fd;
    text-decoration: underline;
    transition: color 0.2s;
}

.gscc-banner__policy a:hover {
    color: #bfdbfe;
}

/* --- 3. Categories (Settings) --- */
.gscc-banner__categories {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    display: none; /* נשלט ע"י JS */
    gap: 1rem;
    font-size: 13px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.gscc-banner__categories label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.gscc-banner__categories input[type="checkbox"] {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* --- 4. Buttons --- */
.gscc-banner__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.gscc-btn {
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

/* Focus States for Accessibility - קריטי למקלדת! */
.gscc-btn:focus-visible,
.gscc-banner__policy a:focus-visible,
.gscc-banner__categories input:focus-visible,
.gscc-reopen-btn:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.gscc-btn--primary {
    background: #2563eb;
    color: #fff;
}

.gscc-btn--primary:hover {
    background: #1d4ed8;
}

.gscc-btn--secondary {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid #4b5563;
}

.gscc-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #9ca3af;
}

/* --- 5. Floating Reopen Button (חדש) --- */
.gscc-reopen-btn {
    position: fixed;
    bottom: 20px;
    left: 20px; /* צד שמאל, כדי לא להפריע לצ'אטים שבדרך כלל בימין */
    z-index: 99990;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.gscc-reopen-btn:hover {
    transform: scale(1.1);
    background: #1d4ed8;
}

.gscc-reopen-btn svg {
    width: 24px;
    height: 24px;
}

/* --- 6. Responsive --- */
@media (max-width: 640px) {
    .gscc-banner {
        bottom: 0.5rem;
        inset-inline: 0.5rem;
        font-size: 13px;
        padding: 1rem;
    }

    .gscc-banner__buttons {
        flex-direction: column-reverse; /* כפתורים אחד מתחת לשני בנייד */
        width: 100%;
    }

    .gscc-btn {
        width: 100%;
        text-align: center;
    }

    .gscc-reopen-btn {
        bottom: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }
}