/* iOS PWA Install Modal Styles */

/* Modal Overlay */
.ios-pwa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

/* Modal Container */
.ios-pwa-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Modal Header */
.ios-pwa-header {
    padding: 24px 24px 16px;
    text-align: center;
    position: relative;
}

.ios-pwa-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 20px;
    color: #666;
}

.ios-pwa-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.ios-pwa-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.ios-pwa-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* Tutorial Steps */
.ios-pwa-tutorial {
    padding: 0 24px 16px;
}

.ios-tutorial-step {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.ios-tutorial-step:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ios-step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #937a9b 0%, #7a5f85 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.ios-step-content {
    flex: 1;
}

.ios-step-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.ios-step-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.ios-step-icon {
    font-size: 24px;
    margin-left: 8px;
}

/* Benefits Section */
.ios-pwa-benefits {
    padding: 0 24px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ios-benefit {
    text-align: center;
    padding: 16px 8px;
    background: rgba(147, 122, 155, 0.08);
    border-radius: 12px;
}

.ios-benefit-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.ios-benefit-text {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    line-height: 1.3;
}

/* Action Buttons */
.ios-pwa-actions {
    padding: 0 24px 24px;
}

.ios-pwa-install-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #937a9b 0%, #7a5f85 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(147, 122, 155, 0.3);
    margin-bottom: 12px;
}

.ios-pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(147, 122, 155, 0.4);
}

.ios-pwa-install-btn:active {
    transform: translateY(0);
}

.ios-pwa-dismiss {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #666;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ios-pwa-dismiss:hover {
    color: #937a9b;
}

/* Floating Helper (after user clicks install) */
.ios-pwa-helper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #937a9b 0%, #7a5f85 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(147, 122, 155, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 99998;
    animation: slideUpHelper 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ios-helper-content {
    flex: 1;
}

.ios-helper-text {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
}

.ios-helper-subtext {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.ios-helper-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.ios-helper-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ios-helper-arrow {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    animation: bounce 1.5s infinite;
}

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

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

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

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

/* Success Message */
.ios-pwa-success {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    z-index: 100000;
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.ios-success-icon {
    font-size: 24px;
}

.ios-success-text {
    font-size: 15px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 480px) {
    .ios-pwa-modal {
        border-radius: 24px 24px 0 0;
        max-height: 85vh;
    }
    
    .ios-pwa-title {
        font-size: 20px;
    }
    
    .ios-pwa-benefits {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .ios-benefit {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 12px;
    }
    
    .ios-benefit-icon {
        margin-bottom: 0;
        font-size: 24px;
    }
}

/* Dark theme support (optional) */
@media (prefers-color-scheme: dark) {
    .ios-pwa-modal {
        background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
    }
    
    .ios-pwa-title {
        color: #ffffff;
    }
    
    .ios-pwa-subtitle,
    .ios-step-description,
    .ios-benefit-text {
        color: #a0a0a0;
    }
    
    .ios-tutorial-step {
        background: #2a2a2a;
    }
    
    .ios-step-title {
        color: #ffffff;
    }
    
    .ios-benefit {
        background: rgba(147, 122, 155, 0.15);
    }
}
