/* ========================================================
   CREED STORE - PWA INSTALL SYSTEM STYLES
   ======================================================== */

/* --- Floating Mini-Banner (Option 1) --- */
.pwa-floating-banner {
    position: fixed;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 20px);
    max-width: 440px;
    z-index: 70;
    background: rgba(11, 22, 43, 0.95);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(0, 197, 255, 0.35);
    border-radius: 20px;
    padding: 10px 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(0, 197, 255, 0.15);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Dynamically float WhatsApp Support button cleanly above the Install Banner on mobile */
@media (max-width: 768px) {
    body.pwa-banner-active .floating-actions-dock,
    body:has(#pwa-floating-banner:not([style*="display: none"])) .floating-actions-dock {
        bottom: calc(148px + env(safe-area-inset-bottom, 12px)) !important;
        transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
}

@keyframes pwaSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes pwaSlideDown {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
}

.pwa-floating-banner.pwa-slide-up {
    animation: pwaSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pwa-floating-banner.pwa-slide-down {
    animation: pwaSlideDown 0.25s ease-in forwards;
}

.pwa-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pwa-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.pwa-banner-icon-wrap {
    position: relative;
    flex-shrink: 0;
}

.pwa-banner-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: contain;
    border: 1px solid rgba(0, 197, 255, 0.4);
    background: #060d1a;
    box-shadow: 0 0 10px rgba(0, 197, 255, 0.25);
}

.pwa-badge-pulse {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    border: 1.5px solid #0b162b;
    box-shadow: 0 0 8px #10b981;
    animation: pwaPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pwaPing {
    75%, 100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.pwa-banner-text {
    min-width: 0;
    flex: 1;
}

.pwa-banner-title {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.pwa-banner-subtitle {
    font-size: 10px;
    font-weight: 500;
    color: #00c5ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pwa-install-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #00c5ff 0%, #0077ff 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 197, 255, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pwa-install-trigger-btn:active {
    transform: scale(0.94);
}

.pwa-banner-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.pwa-banner-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

/* --- iOS Step-by-Step Instructions Modal --- */
.pwa-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(4, 9, 20, 0.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

@media (min-width: 640px) {
    .pwa-modal-backdrop {
        align-items: center;
        padding: 20px;
    }
}

.pwa-modal-card {
    background: #0a1324;
    border: 1px solid rgba(0, 197, 255, 0.3);
    border-radius: 28px 28px 0 0;
    width: 100%;
    max-width: 440px;
    padding: 22px 20px 24px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 197, 255, 0.15);
    animation: pwaSheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 640px) {
    .pwa-modal-card {
        border-radius: 24px;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 197, 255, 0.15);
    }
}

@keyframes pwaSheetUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.pwa-modal-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-modal-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #060d1a;
    border: 1px solid rgba(0, 197, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(0, 197, 255, 0.25);
}

.pwa-modal-title {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.pwa-modal-desc {
    font-size: 11px;
    color: #00c5ff;
    margin: 2px 0 0;
    font-weight: 500;
}

.pwa-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
}

.pwa-modal-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.pwa-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(15, 27, 51, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
}

.pwa-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00c5ff, #0077ff);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.pwa-step-body {
    flex: 1;
}

.pwa-step-heading {
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pwa-ios-icon-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: rgba(0, 197, 255, 0.15);
    color: #00c5ff;
    font-size: 11px;
}

.pwa-step-sub {
    font-size: 10px;
    color: #64748b;
    margin: 2px 0 0;
}

.pwa-modal-action-btn {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #00c5ff 0%, #0077ff 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 197, 255, 0.4);
    transition: transform 0.15s ease;
}

.pwa-modal-action-btn:active {
    transform: scale(0.97);
}

/* --- Footer Card Custom Styles --- */
.pwa-footer-card {
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.pwa-footer-card:hover {
    border-color: rgba(0, 197, 255, 0.55);
}

.pwa-install-btn.is-installed {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
    cursor: default !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* ========================================================
   HOMEPAGE FOOTER SOCIAL BAR (CYBER MOBILE-FIRST DOCK)
   ======================================================== */
.footer-social-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .footer-social-bar {
        justify-content: flex-start;
        gap: 10px;
        margin-top: 14px;
        margin-bottom: 6px;
    }
}

.footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(15, 27, 49, 0.85);
    border: 1px solid rgba(157, 185, 220, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.footer-social-link:active {
    transform: scale(0.92);
}

.footer-social-link.social-wa { color: #25d366; }
.footer-social-link.social-wa:hover {
    background: rgba(37, 211, 102, 0.18);
    border-color: #25d366;
    box-shadow: 0 0 16px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.footer-social-link.social-tg { color: #229ed9; }
.footer-social-link.social-tg:hover {
    background: rgba(34, 158, 217, 0.18);
    border-color: #229ed9;
    box-shadow: 0 0 16px rgba(34, 158, 217, 0.4);
    transform: translateY(-2px);
}

.footer-social-link.social-ig { color: #e1306c; }
.footer-social-link.social-ig:hover {
    background: rgba(225, 48, 108, 0.18);
    border-color: #e1306c;
    box-shadow: 0 0 16px rgba(225, 48, 108, 0.4);
    transform: translateY(-2px);
}

.footer-social-link.social-yt { color: #ff3333; }
.footer-social-link.social-yt:hover {
    background: rgba(255, 51, 51, 0.18);
    border-color: #ff3333;
    box-shadow: 0 0 16px rgba(255, 51, 51, 0.4);
    transform: translateY(-2px);
}

.footer-social-link.social-fb { color: #1877f2; }
.footer-social-link.social-fb:hover {
    background: rgba(24, 119, 242, 0.18);
    border-color: #1877f2;
    box-shadow: 0 0 16px rgba(24, 119, 242, 0.4);
    transform: translateY(-2px);
}

.footer-social-link.social-wagroup { color: #14b8a6; }
.footer-social-link.social-wagroup:hover {
    background: rgba(20, 184, 166, 0.18);
    border-color: #14b8a6;
    box-shadow: 0 0 16px rgba(20, 184, 166, 0.4);
    transform: translateY(-2px);
}
