/* ================================================================================
   PWA.CSS - Progressive Web App Styles
   Handles: Install prompts, iOS guide, update notifications
   ================================================================================ */

/* ================================
   INSTALL BANNER (Android/Desktop)
   ================================ */

#pwa-install-banner {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    z-index: 1500;
    animation: slideDown 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
}

.install-icon {
    font-size: 1.5rem;
}

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

.install-text strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.2;
}

.install-text small {
    opacity: 0.9;
    font-size: 0.8rem;
}

.install-actions {
    display: flex;
    gap: 8px;
}

#pwa-install-btn, 
#pwa-dismiss-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
}

#pwa-install-btn {
    background: rgba(255,255,255,0.9);
    color: #667eea;
    font-weight: 600;
}

#pwa-dismiss-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    width: 28px;
    padding: 6px;
}


/* ================================
   UPDATE NOTIFICATION
   ================================ */

.pwa-update-banner {
    position: fixed;
    bottom: var(--nav-height);
    left: 16px;
    right: 16px;
    background: #667eea;
    color: white;
    padding: 12px;
    border-radius: 12px;
    z-index: 1500;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

.pwa-update-btn {
    margin-left: 12px;
    background: white;
    color: #667eea;
    border: none;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ================================
   INSTALL SUCCESS TOAST
   ================================ */

.pwa-success-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #10b981;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    z-index: 2000;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: popIn 0.3s ease;
}

/* ================================
   PWA MODE STYLES
   ================================ */

body.pwa-mode {
    /* Add any special styles for when running as PWA */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ================================
   ANIMATIONS
   ================================ */

@keyframes slideDown {
    from { 
        transform: translateY(-100%);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from { 
        transform: translateY(100%);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes popIn {
    from { 
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}














/* ================================
   IOS GUIDE FINAL
   ================================ */

#ios-install-guide {
   background: rgba(0, 0, 0, 0.7);
   z-index: var(--z-onboarding);
}

/* Animation for modal appearance */
#ios-install-guide.active {
   animation: slideUp 1s ease;
}

#ios-install-guide .modal-header {
   padding: 0 var(--space-md) var(--space-md);
   border: none;
}

.ios-guide-icon {
   font-size: var(--text-4xl);
}

#ios-install-guide .modal-header h2 {
   margin: 0 0 var(--space-xs) 0;
}

#ios-install-guide .modal-header p {
   color: rgba(255, 255, 255, 0.9);
}

.ios-guide-steps {
   display: flex;
   flex-direction: column;
   gap: var(--space-lg);
   padding: 0 var(--space-lg);
}

.ios-step {
   display: flex;
   flex-direction: column;
   position: relative;
   align-items: center;
   justify-content: center;
   padding: var(--space-md);
   background: #f8f9fa;
   border-radius: var(--radius-xl);
   transition: all 0.3s ease;
   height: 8vh;
   height: 8dvh;
}

.ios-step:hover {
   background: #e3f2fd;
   transform: translateX(5px);
}

.step-number {
   position: absolute;
   top: 0;
   right: 0;
   background: var(--gold);
   color: var(--primary-gradient);
   width: 3vh;
   height: 3vh;
   border-radius: var(--radius-circle);
   font-size: var(--text-xs);
   font-weight: bold;
   display: flex;
   align-items: center;
   justify-content: center;
}

.step-content {
   display: flex;
   flex: 1;
   align-items: center;
   gap: var(--space-md);
}

.share-icon-visual {
   width: 5vh;
   height: 5vh;
   background: var(--primary-gradient);
   border-radius: var(--radius);
   display: flex;
   align-items: center;
   justify-content: center;
   color: white;
}

.ios-guide-benefits {
   display: flex;
   gap: var(--space-sm);
   justify-content: center;
   flex-wrap: wrap;
}

.ios-benefit {
   color: white;
   padding: var(--space-sm) var(--space-md);
   border-radius: var(--radius-pill);
   font-size: var(--text-xs);
   backdrop-filter: blur(10px);
   background: var(--primary-gradient);
}

.ios-guide-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: var(--space-lg);
    animation: bounce 2s infinite;
}

.arrow-text {
   background: var(--primary-gradient);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

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


/* Animation for removal */
#ios-install-guide.removing {
    animation: fadeOut 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
