/* ===================================================
   FINCONTROL PWA - Install Prompt Styles
   =================================================== */

/* Banner de Instalação */
.pwa-install-banner {
    position: fixed;
    bottom: 80px;
    /* acima do bottom nav */
    left: 1rem;
    right: 1rem;
    max-width: 480px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.15);
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.pwa-install-banner.show {
    transform: translateY(0);
    opacity: 1;
}

@media (min-width: 768px) {
    .pwa-install-banner {
        bottom: 1.5rem;
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(120%);
        width: 400px;
    }

    .pwa-install-banner.show {
        transform: translateX(-50%) translateY(0);
    }
}

.pwa-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pwa-banner-icon img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-text strong {
    display: block;
    font-size: 0.9rem;
    color: #f8fafc;
    margin-bottom: 2px;
}

.pwa-banner-text span {
    font-size: 0.78rem;
    color: #94a3b8;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-install-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pwa-install-btn:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

.pwa-dismiss-btn {
    padding: 0.5rem;
    background: transparent;
    color: #64748b;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.pwa-dismiss-btn:hover {
    color: #94a3b8;
}

/* Modal iOS */
.pwa-ios-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    z-index: 600;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pwa-ios-modal.show {
    opacity: 1;
    pointer-events: all;
}

.pwa-ios-content {
    background: #1e293b;
    border-radius: 20px 20px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    width: 100%;
    max-width: 480px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

.pwa-ios-modal.show .pwa-ios-content {
    transform: translateY(0);
}

.pwa-ios-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin: 0 auto 1.25rem;
}

.pwa-ios-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.pwa-ios-app-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    flex-shrink: 0;
}

.pwa-ios-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.pwa-ios-header p {
    font-size: 0.8rem;
    color: #94a3b8;
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.pwa-ios-step {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.pwa-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #6366f1;
    flex-shrink: 0;
}

.pwa-ios-step span {
    font-size: 0.875rem;
    color: #cbd5e1;
    line-height: 1.4;
}

.pwa-ios-step .highlight {
    color: #6366f1;
    font-weight: 600;
}

.pwa-ios-close {
    width: 100%;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #94a3b8;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.pwa-ios-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

/* Botão de instalação nas configurações */
.pwa-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.pwa-settings-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pwa-settings-info i {
    color: #6366f1;
    width: 20px;
    height: 20px;
}