/* ============================================
   WAJDY 20 — Popup + Floating CTA + Overrides
   v1.0.4
   ============================================ */

:root {
    --w-brand: #8B1A1A;
    --w-brand-dark: #7A1616;
    --w-brand-light: #fdf2f2;
    --w-brand-glow: rgba(139, 26, 26, 0.4);
    --w-radius: 12px;
    --w-radius-lg: 16px;
    --w-radius-xl: 20px;
    --w-transition: 0.25s ease;
}

/* ── Hide old floating bar ── */
.footer_bar.float_bar { display: none !important; }

/* ============================================
   POPUP OVERLAY
   ============================================ */
#wajdy-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#wajdy-popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.popup-card {
    position: relative;
    background: #fff;
    border-radius: var(--w-radius-xl);
    box-shadow: 0 25px 80px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#wajdy-popup-overlay.active .popup-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.popup-header {
    background: var(--w-brand);
    padding: 24px 32px;
}
.popup-header h3 {
    color: #fff !important;
    font-family: 'Playfair Display', serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}
.popup-header p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin: 0;
    font-family: 'Inter', sans-serif;
}
.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--w-transition);
    z-index: 2;
    line-height: 1;
    padding: 0;
}
.popup-close:hover {
    background: rgba(255,255,255,0.3);
}
.popup-form-body {
    padding: 28px 32px 32px;
}
.popup-form-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-family: 'Inter', sans-serif;
}
.popup-form-body input[type="text"],
.popup-form-body input[type="tel"],
.popup-form-body input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: var(--w-radius);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color var(--w-transition), box-shadow var(--w-transition);
    margin-bottom: 14px;
    box-sizing: border-box;
    -webkit-appearance: none;
    background: #fff;
    color: #1f2937;
}
.popup-form-body input:focus {
    border-color: var(--w-brand);
    box-shadow: 0 0 0 3px var(--w-brand-light);
}
.popup-submit {
    width: 100%;
    padding: 16px;
    background: var(--w-brand) !important;
    color: #fff !important;
    border: none;
    border-radius: var(--w-radius);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background var(--w-transition);
    margin-top: 4px;
}
.popup-submit:hover {
    background: var(--w-brand-dark) !important;
}
.popup-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.popup-disclaimer {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 12px;
}

/* ============================================
   FLOATING CTA
   ============================================ */
#wajdy-floating-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
#wajdy-floating-cta .floating-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--w-brand);
    color: #fff;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--w-brand-glow);
    transition: all var(--w-transition);
    animation: wajdy-pulse 2s infinite;
    line-height: 1;
}
#wajdy-floating-cta .floating-btn:hover {
    background: var(--w-brand-dark);
    box-shadow: 0 6px 30px rgba(139, 26, 26, 0.5);
    transform: translateY(-2px);
}
#wajdy-floating-cta .floating-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
#wajdy-floating-cta .floating-phone {
    display: none;
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: 1px solid #f1f1f1;
    text-decoration: none;
}
#wajdy-floating-cta .floating-phone svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--w-brand);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 767px) {
    #wajdy-floating-cta .floating-btn span { display: none; }
    #wajdy-floating-cta .floating-btn {
        width: 56px; height: 56px; padding: 0;
        justify-content: center; border-radius: 50%;
    }
    #wajdy-floating-cta .floating-phone { display: flex; }
    #wajdy-floating-cta { bottom: 16px; right: 16px; }
    .popup-form-body { padding: 20px; }
    .popup-header { padding: 20px; }
}

@keyframes wajdy-pulse {
    0%, 100% { box-shadow: 0 4px 20px var(--w-brand-glow); }
    50% { box-shadow: 0 4px 35px rgba(139, 26, 26, 0.7); }
}

/* ============================================
   SCROLL FADE ANIMATION
   ============================================ */
.wajdy-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}
.wajdy-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PROMO BANNER SHIMMER
   ============================================ */
.wajdy-promo-shimmer { position: relative; overflow: hidden; }
.wajdy-promo-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: wajdy-shimmer 3s infinite;
    pointer-events: none;
}
@keyframes wajdy-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
