/* ==========================================================================
   MARRIAGE LIFE - PWA INSTALL & CREATE SHORTCUT POPUP STYLES
   Position: Top Right | Appearance: After 20 seconds
   ========================================================================== */

/* Main Container - Fixed Top Right */
.ml-pwa-popup-wrapper {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999999;
    max-width: 380px;
    width: calc(100vw - 36px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-20px) translateX(40px) scale(0.92);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Visible State */
.ml-pwa-popup-wrapper.ml-pwa-show {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) translateX(0) scale(1) !important;
    visibility: visible !important;
    display: block !important;
}

/* Card Box */
.ml-pwa-card {
    position: relative;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 20px 18px 16px 18px;
    box-shadow: 0 20px 45px -8px rgba(173, 20, 87, 0.28), 
                0 6px 18px -4px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(233, 30, 99, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

/* Top Shimmer Gradient Stripe */
.ml-pwa-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #AD1457 0%, #E91E63 50%, #FFB300 100%);
}

/* Close Button */
.ml-pwa-close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FDF2F4;
    border: none;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    z-index: 2;
}

.ml-pwa-close-btn:hover {
    background: #FCE4EC;
    color: #AD1457;
    transform: rotate(90deg);
}

/* Badge Row */
.ml-pwa-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #FFF0F5;
    color: #AD1457;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(233, 30, 99, 0.15);
}

.ml-pwa-badge i {
    color: #FFB300;
    font-size: 11px;
}

/* Card Content Layout */
.ml-pwa-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

/* App Icon Container */
.ml-pwa-icon-box {
    position: relative;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 14px;
    background: #3E2723;
    border: 1.5px solid #F5C542;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(62, 39, 35, 0.35);
    overflow: visible;
}

.ml-pwa-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* Notification Dot on Icon (Green Alert Dot) */
.ml-pwa-icon-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #00C853;
    border: 2.5px solid #FFFFFF;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 200, 83, 0.5);
    animation: mlPwaPulse 2s infinite;
}

@keyframes mlPwaPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(0, 200, 83, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 200, 83, 0); }
}

/* App Info */
.ml-pwa-info {
    flex: 1;
    min-width: 0;
}

.ml-pwa-title {
    font-size: 15px;
    font-weight: 700;
    color: #2D0814;
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.ml-pwa-desc {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Action Buttons */
.ml-pwa-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ml-pwa-btn-install {
    flex: 1;
    background: linear-gradient(135deg, #AD1457 0%, #E91E63 100%);
    color: #FFFFFF;
    border: none;
    padding: 10px 14px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(233, 30, 99, 0.35);
    transition: all 0.25s ease;
    text-decoration: none;
}

.ml-pwa-btn-install:hover {
    background: linear-gradient(135deg, #880E4F 0%, #D81B60 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(233, 30, 99, 0.45);
    color: #FFF;
}

.ml-pwa-btn-install:active {
    transform: translateY(1px);
}

.ml-pwa-btn-later {
    background: transparent;
    border: 1px solid #F0C4D4;
    color: #777;
    padding: 9px 14px;
    border-radius: 25px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ml-pwa-btn-later:hover {
    background: #FFF5F7;
    color: #AD1457;
    border-color: #E91E63;
}



/* Responsive adjustments for Tablets & Mobile */
@media (max-width: 576px) {
    .ml-pwa-popup-wrapper {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: 100%;
    }
    
    .ml-pwa-card {
        padding: 12px 12px 10px 12px;
        border-radius: 16px;
        box-shadow: 0 12px 30px -6px rgba(173, 20, 87, 0.25), 
                    0 4px 12px -2px rgba(0, 0, 0, 0.08);
    }

    .ml-pwa-close-btn {
        top: 7px;
        right: 8px;
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .ml-pwa-badge {
        font-size: 9px;
        padding: 2px 7px;
        margin-bottom: 7px;
        letter-spacing: 0.4px;
        gap: 4px;
    }

    .ml-pwa-badge i {
        font-size: 9px;
    }

    .ml-pwa-content {
        gap: 10px;
        margin-bottom: 10px;
    }

    .ml-pwa-icon-box {
        width: 42px;
        height: 42px;
        border-radius: 11px;
        border-width: 1.2px;
    }

    .ml-pwa-icon-box img {
        border-radius: 9px;
    }

    .ml-pwa-icon-dot {
        top: -3px;
        right: -3px;
        width: 11px;
        height: 11px;
        border-width: 2px;
    }

    .ml-pwa-title {
        font-size: 13px;
        margin: 0 0 2px 0;
        line-height: 1.2;
    }

    .ml-pwa-desc {
        font-size: 10.5px;
        line-height: 1.3;
        color: #777;
    }

    .ml-pwa-actions {
        gap: 6px;
    }

    .ml-pwa-btn-install {
        padding: 7px 12px;
        font-size: 11.5px;
        border-radius: 20px;
        gap: 5px;
    }

    .ml-pwa-btn-later {
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 20px;
    }
}

/* Toast Notification (Installed & Shortcut alerts) */
.ml-pwa-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    color: #FFFFFF;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 99999999;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 90vw;
    transition: opacity 0.4s ease, transform 0.4s ease;
    animation: mlFadeInUp 0.3s ease;
}

.ml-pwa-toast i {
    font-size: 14px;
    flex-shrink: 0;
}

@keyframes mlFadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive toast */
@media (max-width: 576px) {
    .ml-pwa-toast {
        bottom: 16px;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: max-content;
        max-width: calc(100vw - 32px);
        padding: 7px 14px;
        font-size: 11.5px;
        border-radius: 20px;
        gap: 6px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    }

    .ml-pwa-toast i {
        font-size: 12px;
    }
}
