/* ============================================================
 * Sahhelha Google Play Button — Glowing & Animated
 * Used in:
 *   - Hero section (replaces "حمّل التطبيق واحجز الآن")
 *   - CTA section (replaces App Store + Google Play badges)
 * ============================================================ */

.sahhelha-gplay-wrap {
    display: inline-block;
    position: relative;
    margin: 8px 0;
    font-family: 'Cairo', sans-serif;
}

.sahhelha-gplay-wrap.is-disabled {
    opacity: .85;
}
.sahhelha-gplay-wrap.is-disabled .sahhelha-gplay-btn {
    cursor: default;
}

/* Pulse rings (3 rings that expand outward) */
.sahhelha-gplay-pulse {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    border: 2px solid rgba(26, 188, 176, .6);
    animation: sahhelhaGplayPulse 2.4s ease-out infinite;
    pointer-events: none;
}
.sahhelha-gplay-pulse-2 { animation-delay: .8s; }
.sahhelha-gplay-pulse-3 { animation-delay: 1.6s; }
@keyframes sahhelhaGplayPulse {
    0% { transform: scale(.95); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* Animated colored glow */
.sahhelha-gplay-glow {
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    background: linear-gradient(135deg, #1ABCB0, #5DCAA5, #FAC775, #5DCAA5, #1ABCB0);
    background-size: 300% 300%;
    filter: blur(12px);
    opacity: .7;
    z-index: 0;
    animation: sahhelhaGplayGlow 4s ease-in-out infinite;
}
@keyframes sahhelhaGplayGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* The main button */
.sahhelha-gplay-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);
    border: 1.5px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    text-decoration: none;
    color: #fff;
    transition: all .3s ease;
    overflow: hidden;
    min-width: 240px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, .4),
        inset 0 1px 0 rgba(255, 255, 255, .08);
    font-family: 'Cairo', sans-serif;
}

.sahhelha-gplay-wrap:not(.is-disabled) .sahhelha-gplay-btn:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(26, 188, 176, .6);
    box-shadow:
        0 16px 40px rgba(26, 188, 176, .4),
        inset 0 1px 0 rgba(255, 255, 255, .15);
    color: #fff;
}

/* Shine effect — sweeping light */
.sahhelha-gplay-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, .25) 50%,
        rgba(255, 255, 255, 0) 80%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: sahhelhaGplayShine 3s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}
@keyframes sahhelhaGplayShine {
    0% { left: -100%; }
    60%, 100% { left: 120%; }
}

/* Sparkles — 3 traveling dots */
.sahhelha-gplay-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(.5px);
    box-shadow: 0 0 8px #fff, 0 0 16px rgba(255, 255, 255, .6);
}
.sahhelha-gplay-sparkle.s1 {
    top: 30%; left: -10%;
    animation: sahhelhaGplaySparkle1 4s ease-in-out infinite;
}
.sahhelha-gplay-sparkle.s2 {
    top: 65%; left: -10%;
    animation: sahhelhaGplaySparkle2 4s ease-in-out infinite 1.5s;
}
.sahhelha-gplay-sparkle.s3 {
    top: 45%; left: -10%;
    animation: sahhelhaGplaySparkle3 4s ease-in-out infinite 2.5s;
}
@keyframes sahhelhaGplaySparkle1 {
    0% { left: -5%; opacity: 0; transform: scale(0); }
    10%, 50% { opacity: 1; transform: scale(1); }
    60%, 100% { left: 105%; opacity: 0; transform: scale(0); }
}
@keyframes sahhelhaGplaySparkle2 {
    0% { left: -5%; opacity: 0; transform: scale(0); }
    10%, 50% { opacity: 1; transform: scale(1.2); }
    60%, 100% { left: 105%; opacity: 0; transform: scale(0); }
}
@keyframes sahhelhaGplaySparkle3 {
    0% { left: -5%; opacity: 0; transform: scale(0); }
    10%, 50% { opacity: 1; transform: scale(.8); }
    60%, 100% { left: 105%; opacity: 0; transform: scale(0); }
}

/* Google Play icon with wiggle */
.sahhelha-gplay-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5));
    animation: sahhelhaGplayWiggle 6s ease-in-out infinite;
}
@keyframes sahhelhaGplayWiggle {
    0%, 90%, 100% { transform: rotate(0deg); }
    93% { transform: rotate(-8deg); }
    96% { transform: rotate(8deg); }
}

/* Text */
.sahhelha-gplay-text {
    text-align: right;
    position: relative;
    z-index: 2;
}
.sahhelha-gplay-text-small {
    font-size: 11.5px;
    color: rgba(255, 255, 255, .75);
    font-weight: 600;
    display: block;
    line-height: 1.2;
    margin-bottom: 2px;
    letter-spacing: .5px;
}
.sahhelha-gplay-text-big {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    font-family: 'Cairo', sans-serif;
    display: block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .sahhelha-gplay-btn {
        padding: 13px 22px;
        min-width: auto;
        width: auto;
        max-width: 280px;
        justify-content: center;
    }
    .sahhelha-gplay-wrap {
        width: auto;
        max-width: 100%;
        display: inline-flex;
    }
    .sahhelha-gplay-text-big { font-size: 16px; }
    .sahhelha-gplay-text-small { font-size: 11px; }
    .sahhelha-gplay-icon { width: 32px; height: 32px; }
}

/* Center container fix when used in app-buttons replacement */
.app-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero CTA wrapper centering */
.hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Prevent horizontal overflow from glow/sparkles on mobile */
@media (max-width: 640px) {
    .hero-cta,
    .app-buttons,
    .sahhelha-cta {
        overflow-x: hidden;
    }
    .sahhelha-gplay-glow {
        inset: -2px;
        filter: blur(8px);
    }
}
