/* ══════════════════════════════════════════════════════════════════
   ST DOLLAR SHOP - PWA APPLICATION SUBSYSTEM STYLES
   ══════════════════════════════════════════════════════════════════ */

.st-pwa-hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.st-pwa-visible {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* 1. Smart Install Banner Component */
.st-pwa-smart-banner,
#st-pwa-smart-banner {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    left: auto !important;
    max-width: 440px !important;
    width: 100% !important;
    margin: 0 !important;
    z-index: 9999999 !important;
    background: #0f172a !important;
    background: rgba(15, 23, 42, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 22px !important;
    padding: 16px 16px 14px 16px !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(99, 102, 241, 0.3) !important;
    direction: rtl !important;
    font-family: 'Cairo', sans-serif !important;
    box-sizing: border-box !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease !important;
}

/* Top Close Button (Discreet Top-Left) */
.st-pwa-btn-close {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
    border: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
    z-index: 5 !important;
    padding: 0 !important;
}

.st-pwa-btn-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    transform: scale(1.08) !important;
}

/* Top Row: App Logo + Info */
.st-pwa-banner-top {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
    padding-left: 28px !important;
}

.st-pwa-banner-logo {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    background: #ffffff !important;
    border-radius: 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
    padding: 4px !important;
    box-sizing: border-box !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    flex-shrink: 0 !important;
}

.st-pwa-banner-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 9px !important;
}

.st-pwa-banner-meta {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 3px !important;
}

.st-pwa-app-name {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    font-family: 'Alexandria', 'Cairo', sans-serif !important;
}

.st-pwa-banner-subtitle {
    font-size: 12px !important;
    color: #94a3b8 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
}

/* Bottom Row: Full-Width Prominent CTA Button */
.st-pwa-banner-bottom {
    width: 100% !important;
}

.st-pwa-btn-install {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    font-family: 'Cairo', sans-serif !important;
    padding: 10px 18px !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    box-sizing: border-box !important;
}

.st-pwa-btn-install:hover,
.st-pwa-btn-install:active {
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5) !important;
}


/* 2. iOS Installation Modal Window Component */
.st-pwa-modal-overlay,
#st-pwa-ios-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999999 !important;
    background: rgba(15, 23, 42, 0.82) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    direction: rtl !important;
    font-family: 'Cairo', sans-serif !important;
}

.st-pwa-modal-card {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: 28px 24px 24px 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.st-pwa-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.st-pwa-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.st-pwa-modal-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.st-pwa-modal-header h3 {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
}

.st-pwa-modal-body p {
    color: #64748b;
    font-size: 13.5px;
    margin-bottom: 16px;
    text-align: center;
}

.st-pwa-ios-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.st-pwa-ios-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
}

.st-step-num {
    background: #6366f1;
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.st-step-txt {
    display: flex;
    flex-direction: column;
}

.st-step-txt strong {
    font-size: 13px;
    color: #0f172a;
}

.st-step-txt span {
    font-size: 11.5px;
    color: #64748b;
}

.st-pwa-modal-footer {
    text-align: center;
}

.st-pwa-btn-primary {
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
}


/* 3. Footer & Account Page Component Elements */
.st-footer-pwa-link {
    color: #6366f1 !important;
    font-weight: 800 !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.st-pwa-account-widget {
    margin-top: 16px;
}

.st-pwa-account-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.25);
    transition: transform 0.2s ease;
}

.st-pwa-account-btn:hover {
    transform: translateY(-2px);
}

@media (max-width: 991px) {
    .st-pwa-smart-banner,
    #st-pwa-smart-banner {
        bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
        right: 12px !important;
        left: 12px !important;
        max-width: calc(100vw - 24px) !important;
        padding: 10px 12px !important;
        z-index: 9999999 !important;
    }

    /* Keep banner cleanly above sticky checkout bar on WooCommerce cart page */
    body.woocommerce-cart .st-pwa-smart-banner,
    body.woocommerce-cart #st-pwa-smart-banner {
        bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

