/* =========================================================
   Shabbat Guard — Frontend Styles
   ========================================================= */

/* ── Top site-wide notice bar ────────────────────────────── */
.sg-top-notice {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99990 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    background: linear-gradient(135deg, #1a2f5e 0%, #0d1f3d 100%) !important;
    color: #f5d98a !important;
    padding: 12px 48px !important;
    text-align: center !important;
    direction: rtl !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    box-shadow: 0 3px 16px rgba(0,0,0,0.3) !important;
    animation: sg-slide-down 0.4s ease !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
/* דחיפת תוכן האתר למטה */
body.sg-shabbat-active {
    padding-top: 52px !important;
    margin-top: 0 !important;
}
/* תמיכה בסרגל הניהול של וורדפרס */
body.admin-bar .sg-top-notice {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    body.admin-bar .sg-top-notice { top: 46px !important; }
    body.sg-shabbat-active        { padding-top: 70px !important; }
}
.sg-top-notice__icon {
    font-size: 1.3rem !important;
    flex-shrink: 0 !important;
    animation: flicker-top 2s infinite alternate !important;
}
@keyframes flicker-top {
    0%   { opacity: 0.8; }
    100% { opacity: 1; filter: drop-shadow(0 0 6px rgba(255,200,80,0.8)); }
}
.sg-top-notice__text {
    flex: 1 !important;
    max-width: 700px !important;
    color: #f5d98a !important;
    font-family: inherit !important;
}
.sg-top-notice__text strong,
.sg-top-notice__text b {
    color: #fff !important;
}
.sg-top-notice__text a {
    color: #f5d98a !important;
    text-decoration: underline !important;
}
.sg-top-notice__text p {
    margin: 0 !important;
    padding: 0 !important;
    color: #f5d98a !important;
}
.sg-top-notice__close {
    position: absolute !important;
    left: 14px !important;
    right: auto !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #f5d98a !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    opacity: 0.7 !important;
    padding: 4px 8px !important;
    transition: opacity 0.2s !important;
    line-height: 1 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}
.sg-top-notice__close:hover {
    opacity: 1 !important;
    background: none !important;
    box-shadow: none !important;
}

@keyframes sg-slide-down {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}


.sg-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fff8e1 0%, #fef3c7 100%);
    border: 2px solid #f5d98a;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 16px 0 24px;
    font-size: 1rem;
    color: #7a5c00;
    direction: rtl;
    text-align: right;
    box-shadow: 0 2px 12px rgba(245,217,138,0.25);
    animation: sg-fade-in 0.4s ease;
}
.sg-notice::before {
    content: '🕯️';
    font-size: 1.5rem;
    flex-shrink: 0;
}
.sg-notice--shop {
    margin-bottom: 28px;
}

/* ── Disabled add-to-cart buttons ────────────────────────── */
.sg-shabbat-active .add_to_cart_button,
.sg-shabbat-active .single_add_to_cart_button,
.sg-shabbat-active button[name="add-to-cart"],
.sg-shabbat-active .checkout-button,
.sg-shabbat-active a.checkout {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(80%) !important;
}

/* ── Tooltip on disabled buttons ─────────────────────────── */
.sg-btn-wrap {
    position: relative;
    display: inline-block;
}
.sg-btn-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 50%;
    transform: translateX(50%);
    background: #1a2f5e;
    color: #f5d98a;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    white-space: nowrap;
    direction: rtl;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.2s;
}
.sg-btn-wrap:hover .sg-btn-tooltip { opacity: 1; }
.sg-btn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    border: 6px solid transparent;
    border-top-color: #1a2f5e;
}

.sg-top-notice__candles {
    font-size: 1.2rem !important;
    flex-shrink: 0 !important;
    letter-spacing: 2px !important;
    /* צד ימין — הסדר הטבעי ב-RTL שם אותם ראשונים */
}

/* ── Floating shabbat badge ──────────────────────────────── */
.sg-floating-badge {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    background: linear-gradient(135deg, #1a2f5e 0%, #0d1f3d 100%) !important;
    color: #f5d98a !important;
    padding: 10px 16px !important;
    border-radius: 50px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
    z-index: 9998 !important;
    cursor: default !important;
    direction: rtl !important;
    animation: sg-float 3s ease-in-out infinite !important;
}
.sg-badge-candles {
    letter-spacing: 2px !important;
    flex-shrink: 0 !important;
}
@keyframes sg-float {
    0%,  100% { transform: translateY(0px); }
    50%        { transform: translateY(-7px); }
}



/* ── Animations ──────────────────────────────────────────── */
@keyframes sg-fade-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
