/**
 * PWA Install Button Styles
 * Add to Home Screen button for iOS and Android
 */

/* Install Button in Sliding Menu - Prominent outlined style */
.pwa-install-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    margin: 16px;
    margin-top: auto;
    background: #f0f7ff;
    color: #2563eb;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    width: calc(100% - 32px);
}

.pwa-install-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pwa-install-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.pwa-install-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.pwa-install-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.pwa-install-btn:hover .pwa-install-icon {
    stroke: white;
}

.pwa-install-text {
    line-height: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .pwa-install-btn {
        padding: 13px 20px;
        margin: 14px;
        width: calc(100% - 28px);
        font-size: 14px;
    }
    
    .pwa-install-icon {
        width: 17px;
        height: 17px;
    }
}

/* iOS Install Instructions Modal */
.ios-install-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ios-install-modal.show {
    opacity: 1;
}

.ios-install-content {
    background: white;
    border-radius: 20px;
    padding: 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: env(safe-area-inset-bottom, 20px);
}

.ios-install-modal.show .ios-install-content {
    transform: translateY(0);
}

.ios-install-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ios-install-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.ios-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.ios-step-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    flex: 1;
}

.ios-share-icon {
    color: #007AFF;
    flex-shrink: 0;
}

.ios-install-dismiss {
    width: 100%;
    padding: 14px 24px;
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ios-install-dismiss:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

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

/* RTL Support */
[dir="rtl"] .ios-step {
    text-align: right;
}

/* Dark mode support (if needed in the future) */
@media (prefers-color-scheme: dark) {
    /* Styles are designed to work well on the gradient background already */
}

