/**
 * IndiManga PWA - Enhanced Install UI Styles
 * Multiple install prompt options with IndiManga design
 */

/* ============================================
   BANNER STYLES
   ============================================ */

.indimanga-pwa-banner {
    position: fixed;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1F2937 0%, #000000 100%);
    border: 2px solid #DC2626;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    z-index: 999998;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.indimanga-pwa-banner[data-position="top"] {
    top: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    transform: translateY(-100%);
}

.indimanga-pwa-banner[data-position="bottom"] {
    bottom: 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.indimanga-pwa-banner.visible {
    transform: translateY(0);
    opacity: 1;
}

.pwa-banner-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.pwa-banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-banner-icon svg {
    width: 24px;
    height: 24px;
    color: #FFFFFF;
}

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

.pwa-banner-title {
    display: block;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
}

.pwa-banner-subtitle {
    display: block;
    color: #9CA3AF;
    font-size: 13px;
    line-height: 1.4;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-banner-button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pwa-banner-install {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: #FFFFFF;
}

.pwa-banner-install:hover {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    transform: translateY(-1px);
}

.pwa-banner-close {
    background: transparent;
    color: #9CA3AF;
    padding: 4px 8px;
    font-size: 24px;
    line-height: 1;
}

.pwa-banner-close:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   MODAL STYLES
   ============================================ */

.indimanga-pwa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.indimanga-pwa-modal {
    position: relative;
    max-width: 500px;
    width: 100%;
    background: linear-gradient(135deg, #1F2937 0%, #000000 100%);
    border: 2px solid #DC2626;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.pwa-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: #FFFFFF;
    font-size: 24px;
    line-height: 1;
    transition: all 0.2s ease;
}

.pwa-modal-close:hover {
    background: rgba(220, 38, 38, 0.3);
    transform: rotate(90deg);
}

.pwa-modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.3);
}

.pwa-modal-icon svg {
    width: 48px;
    height: 48px;
    color: #FFFFFF;
}

.pwa-modal-content {
    text-align: center;
    margin-bottom: 24px;
}

.pwa-modal-content h3 {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.pwa-modal-content p {
    color: #D1D5DB;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.pwa-modal-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: left;
}

.pwa-modal-features li {
    color: #D1D5DB;
    font-size: 15px;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-modal-features li svg {
    color: #DC2626;
    flex-shrink: 0;
}

.pwa-modal-buttons {
    display: flex;
    gap: 12px;
}

.pwa-modal-button {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-modal-button-primary {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: #FFFFFF;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
}

.pwa-modal-button-primary:hover {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.4);
}

.pwa-modal-button-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pwa-modal-button-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   FLOATING ACTION BUTTON (FAB) STYLES
   ============================================ */

.indimanga-pwa-fab {
    position: fixed;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.4);
    cursor: pointer;
    z-index: 999997;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0);
    opacity: 0;
}

.indimanga-pwa-fab.visible {
    transform: scale(1);
    opacity: 1;
}

.indimanga-pwa-fab[data-position="bottom-right"] {
    bottom: 24px;
    right: 24px;
}

.indimanga-pwa-fab[data-position="bottom-left"] {
    bottom: 24px;
    left: 24px;
}

.indimanga-pwa-fab[data-position="top-right"] {
    top: 24px;
    right: 24px;
}

.indimanga-pwa-fab[data-position="top-left"] {
    top: 24px;
    left: 24px;
}

.indimanga-pwa-fab:hover {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.5);
}

.indimanga-pwa-fab svg {
    width: 28px;
    height: 28px;
    color: #FFFFFF;
}

.pwa-fab-label {
    position: absolute;
    right: calc(100% + 12px);
    background: #1F2937;
    color: #FFFFFF;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.indimanga-pwa-fab[data-position="bottom-left"] .pwa-fab-label,
.indimanga-pwa-fab[data-position="top-left"] .pwa-fab-label {
    right: auto;
    left: calc(100% + 12px);
}

.indimanga-pwa-fab:hover .pwa-fab-label {
    opacity: 1;
}

/* ============================================
   IOS INSTRUCTIONS
   ============================================ */

.pwa-ios-instructions {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.pwa-ios-instructions h4 {
    color: #60A5FA;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.pwa-ios-instructions ol {
    color: #D1D5DB;
    font-size: 14px;
    margin: 0;
    padding-left: 24px;
}

.pwa-ios-instructions li {
    padding: 6px 0;
    line-height: 1.6;
}

/* ============================================
   MESSAGE STYLES
   ============================================ */

.pwa-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 600;
}

.pwa-message.visible {
    transform: translateY(0);
    opacity: 1;
}

.pwa-message-success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
}

.pwa-message-error {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: #FFFFFF;
}

/* ============================================
   INSTALL BUTTON/LINK STYLES
   ============================================ */

.indimanga-pwa-install-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.indimanga-pwa-install-button:hover {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.4);
    color: #FFFFFF;
}

.indimanga-pwa-install-button svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .pwa-banner-container {
        padding: 10px 16px;
        gap: 12px;
    }
    
    .pwa-banner-icon {
        width: 36px;
        height: 36px;
    }
    
    .pwa-banner-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .pwa-banner-title {
        font-size: 14px;
    }
    
    .pwa-banner-subtitle {
        font-size: 12px;
    }
    
    .pwa-banner-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .indimanga-pwa-modal {
        padding: 24px;
    }
    
    .pwa-modal-icon {
        width: 64px;
        height: 64px;
    }
    
    .pwa-modal-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .pwa-modal-content h3 {
        font-size: 20px;
    }
    
    .pwa-modal-buttons {
        flex-direction: column;
    }
    
    .indimanga-pwa-fab {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }
    
    .indimanga-pwa-fab svg {
        width: 24px;
        height: 24px;
    }
    
    .pwa-fab-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .pwa-banner-subtitle {
        display: none;
    }
}


/* ============================================
   MESSAGE NOTIFICATION STYLES
   ============================================ */

.pwa-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    color: #FFFFFF;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 90%;
    width: auto;
    min-width: 300px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.pwa-message.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pwa-message-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.pwa-message-text {
    flex: 1;
}

/* Message type variations */
.pwa-message-error {
    border: 2px solid #DC2626;
    background: linear-gradient(135deg, #991B1B 0%, #7F1D1D 100%);
}

.pwa-message-warning {
    border: 2px solid #F59E0B;
    background: linear-gradient(135deg, #B45309 0%, #92400E 100%);
}

.pwa-message-info {
    border: 2px solid #3B82F6;
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
}

.pwa-message-success {
    border: 2px solid #10B981;
    background: linear-gradient(135deg, #047857 0%, #065F46 100%);
}

@media (max-width: 640px) {
    .pwa-message {
        min-width: 250px;
        padding: 12px 16px;
        font-size: 13px;
    }
}
