/* ===== App Download Popup ===== */

.app-popup-modal .modal-dialog {
    max-width: 580px;
    margin: 1.75rem auto;
}

@media (min-width: 992px) {
    .app-popup-modal .modal-dialog {
        max-width: 640px;
    }
}

.app-popup-modal .modal-content {
    position: relative;
    border: 0;
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 30px 70px rgba(0, 137, 123, 0.35),
        0 15px 30px rgba(0, 0, 0, 0.12);
    background: #ffffff;
}

.app-popup-modal.show .modal-dialog {
    animation: appPopupDialogIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes appPopupDialogIn {
    0%   { opacity: 0; transform: translateY(40px) scale(0.92); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-backdrop.show {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: radial-gradient(ellipse at center, rgba(0, 30, 26, 0.55), rgba(0, 12, 10, 0.78));
    opacity: 1 !important;
}

/* === Close button === */
.app-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.95);
    color: #00897B;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.app-popup-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: #00897B;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 137, 123, 0.5);
}

.app-popup-close i { font-size: 16px; }

/* === Hero with gradient + decoration === */
.app-popup-hero {
    position: relative;
    height: 280px;
    background:
        radial-gradient(circle at 20% 30%, #4DB6AC 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, #00574C 0%, transparent 55%),
        linear-gradient(135deg, #00897B 0%, #26A69A 50%, #B2DFDB 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-popup-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    animation: appShapeFloat 7s ease-in-out infinite;
}

.app-popup-shape-1 {
    width: 140px; height: 140px;
    top: -50px; left: -40px;
}

.app-popup-shape-2 {
    width: 90px; height: 90px;
    bottom: -30px; right: -25px;
    animation-delay: 1.5s;
    background: rgba(255, 255, 255, 0.22);
}

.app-popup-shape-3 {
    width: 55px; height: 55px;
    top: 25px; right: 50px;
    animation-delay: 3s;
    background: rgba(255, 255, 255, 0.18);
}

@keyframes appShapeFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-18px) rotate(180deg); }
}

/* === Floating petals === */
.app-popup-petal {
    position: absolute;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    animation: appPetalFall 6s linear infinite;
}

.app-popup-petal-1 { top: -10%; left: 15%; animation-delay: 0s;   font-size: 16px; }
.app-popup-petal-2 { top: -10%; left: 40%; animation-delay: 1.4s; font-size: 12px; }
.app-popup-petal-3 { top: -10%; left: 65%; animation-delay: 2.8s; font-size: 18px; }
.app-popup-petal-4 { top: -10%; left: 85%; animation-delay: 4.2s; font-size: 13px; }

@keyframes appPetalFall {
    0%   { transform: translateY(0) rotate(0deg);   opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(260px) rotate(360deg); opacity: 0; }
}

/* === Phone mockup === */
.app-popup-phone {
    position: relative;
    z-index: 2;
    width: 140px;
    height: 220px;
    background: linear-gradient(145deg, #1a1a1a, #2c2c2c);
    border-radius: 22px;
    padding: 9px 7px;
    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.4),
        inset 0 0 0 2px rgba(255, 255, 255, 0.15);
    animation: appPhoneFloat 3s ease-in-out infinite;
}

@keyframes appPhoneFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.app-popup-phone-notch {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    background: #000;
    border-radius: 4px;
    z-index: 3;
}

.app-popup-phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #fff 0%, #E0F2F1 50%, #B2DFDB 100%);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 6px;
}

.app-popup-phone-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #00897B, #00574C);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    box-shadow: 0 6px 14px rgba(0, 87, 76, 0.45);
    animation: appLogoPulse 2s ease-in-out infinite;
}

@keyframes appLogoPulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 6px 14px rgba(0, 87, 76, 0.45); }
    50%      { transform: scale(1.08); box-shadow: 0 8px 22px rgba(0, 87, 76, 0.65); }
}

.app-popup-phone-brand {
    font-size: 14px;
    font-weight: 700;
    color: #00574C;
    letter-spacing: 0.5px;
}

.app-popup-phone-bars {
    display: flex;
    gap: 3px;
    margin-top: 4px;
}

.app-popup-phone-bars span {
    display: block;
    width: 16px;
    height: 3px;
    background: rgba(0, 137, 123, 0.4);
    border-radius: 2px;
}

.app-popup-phone-bars span:nth-child(1) { width: 22px; background: rgba(0, 137, 123, 0.7); }
.app-popup-phone-bars span:nth-child(2) { width: 14px; }
.app-popup-phone-bars span:nth-child(3) { width: 18px; background: rgba(0, 137, 123, 0.55); }

/* === NEW badge === */
.app-popup-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: #fff;
    color: #00897B;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    z-index: 3;
}

.app-popup-badge i {
    color: #ffc107;
    font-size: 11px;
}

/* === Body === */
.app-popup-body {
    padding: 32px 40px 30px;
    text-align: center;
}

.app-popup-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a3530;
    margin: 0 0 10px;
    line-height: 1.3;
    background: linear-gradient(135deg, #00574C, #00897B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-popup-subtitle {
    font-size: 15px;
    color: #4a5e5b;
    margin: 0 0 22px;
    line-height: 1.55;
}

/* === Features row === */
.app-popup-features {
    display: flex;
    justify-content: space-around;
    margin-bottom: 26px;
    padding: 18px 10px;
    background: linear-gradient(135deg, rgba(252, 228, 236, 0.6), rgba(248, 187, 208, 0.3));
    border-radius: 18px;
}

.app-popup-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #2d4a45;
    font-weight: 600;
    flex: 1;
}

.app-popup-feature i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: #00897B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 137, 123, 0.22);
}

/* === Store buttons (custom, with text) === */
.app-popup-stores {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 18px;
}

.app-popup-store-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.28s ease;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.app-popup-store-btn::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.app-popup-store-btn:hover {
    transform: translateY(-4px);
    color: #fff;
    text-decoration: none;
}

.app-popup-store-btn:hover::before {
    left: 100%;
}

.app-popup-store-btn:active {
    transform: translateY(-1px);
}

/* Google Play — brand green gradient + multi-color play icon */
.app-popup-store-btn--google {
    background: linear-gradient(135deg, #01875f 0%, #00a866 50%, #34a853 100%);
    box-shadow: 0 6px 18px rgba(1, 135, 95, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.app-popup-store-btn--google:hover {
    box-shadow: 0 14px 30px rgba(1, 135, 95, 0.5);
}

.app-popup-store-btn--google i {
    font-size: 30px;
    flex-shrink: 0;
    background: conic-gradient(from 200deg at 50% 50%, #ea4335, #fbbc05, #34a853, #4285f4, #ea4335);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

/* App Store — Apple blue gradient + white apple */
.app-popup-store-btn--apple {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 50%, #003ea8 100%);
    box-shadow: 0 6px 18px rgba(0, 81, 213, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.app-popup-store-btn--apple:hover {
    box-shadow: 0 14px 30px rgba(0, 81, 213, 0.5);
}

.app-popup-store-btn--apple i {
    font-size: 32px;
    flex-shrink: 0;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.app-popup-store-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.app-popup-store-text small {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.95;
    font-weight: 500;
    color: #fff;
}

.app-popup-store-text strong {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #fff;
}

/* === Later link === */
.app-popup-later {
    background: transparent;
    border: 0;
    color: #7a8a87;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 14px;
    transition: color 0.2s ease;
}

.app-popup-later:hover {
    color: #00897B;
    text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 480px) {
    .app-popup-modal .modal-dialog {
        max-width: calc(100% - 20px);
        margin: 10px auto;
    }

    .app-popup-hero { height: 195px; }

    .app-popup-phone {
        width: 95px;
        height: 150px;
    }

    .app-popup-phone-logo {
        width: 38px; height: 38px; font-size: 18px;
    }

    .app-popup-body { padding: 22px 20px 20px; }

    .app-popup-title { font-size: 19px; }

    .app-popup-features { padding: 12px 4px; }

    .app-popup-feature { font-size: 10px; }

    .app-popup-feature i {
        width: 28px; height: 28px; font-size: 12px;
    }

    .app-popup-stores {
        flex-direction: column;
    }

    .app-popup-store-btn {
        padding: 11px 16px;
    }

    .app-popup-store-btn i { font-size: 24px; }
}
