/**
 * App Installer Styles
 * Estilos para banners de descarga y modales
 */

/* ==========================================
   FOOTER DOWNLOAD BANNER
   ========================================== */

#app-download-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
}

#app-download-footer.hidden {
    display: none !important;
}

#app-download-footer .banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

#app-download-footer .banner-icon {
    font-size: 28px;
    animation: bounce 2s infinite;
}

#app-download-footer .banner-text {
    color: white;
}

#app-download-footer .banner-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

#app-download-footer .banner-text span {
    font-size: 12px;
    opacity: 0.9;
}

#app-download-footer .btn-download {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#app-download-footer .btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

#app-download-footer .btn-download i {
    font-size: 16px;
}

/* Ajuste para móviles */
@media (max-width: 480px) {
    #app-download-footer {
        flex-direction: column;
        padding: 15px;
        padding-top: 35px;
        gap: 12px;
    }

    #app-download-footer .btn-download {
        width: 100%;
        justify-content: center;
    }

    #app-download-footer .banner-actions {
        width: 100%;
    }
}

/* Botón de cierre X */
#app-download-footer .btn-dismiss {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

#app-download-footer .btn-dismiss:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Container de acciones */
#app-download-footer .banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botón "Más tarde" */
#app-download-footer .btn-later {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#app-download-footer .btn-later:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Animación de salida */
@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* ==========================================
   HERO CARD (DASHBOARD)
   ========================================== */

#app-download-hero {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(17, 153, 142, 0.3);
    animation: fadeInDown 0.5s ease-out;
}

#app-download-hero.hidden {
    display: none !important;
}

#app-download-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

#app-download-hero .hero-dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 1;
}

#app-download-hero .hero-dismiss:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

#app-download-hero .hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

#app-download-hero .hero-icon {
    font-size: 48px;
    animation: pulse 2s infinite;
}

#app-download-hero .hero-text {
    flex: 1;
    color: white;
}

#app-download-hero .hero-text h3 {
    font-size: 18px;
    margin: 0 0 5px 0;
    font-weight: 700;
}

#app-download-hero .hero-text p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

#app-download-hero .hero-actions {
    display: flex;
    gap: 10px;
}

#app-download-hero .btn-hero-download {
    background: white;
    color: #11998e;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

#app-download-hero .btn-hero-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    #app-download-hero .hero-content {
        flex-direction: column;
        text-align: center;
    }

    #app-download-hero .hero-actions {
        width: 100%;
    }

    #app-download-hero .btn-hero-download {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   MODALES
   ========================================== */

.app-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.app-modal-overlay.hidden {
    display: none !important;
}

.app-modal-overlay.forced {
    pointer-events: auto;
}

.app-modal-content {
    background: var(--card-bg, #1a1a2e);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease-out;
    text-align: center;
}

.app-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--bg-secondary, #232342);
    border: none;
    color: var(--text-secondary, #888);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.app-modal-close:hover {
    background: var(--danger, #e74c3c);
    color: white;
}

.app-modal-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.app-modal-content h3 {
    color: var(--text-primary, white);
    font-size: 22px;
    margin: 0 0 20px 0;
}

/* Install Instructions */
.install-steps {
    text-align: left;
    padding: 0;
    margin: 20px 0;
    list-style: none;
}

.install-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--text-primary, white);
    font-size: 14px;
}

.install-steps .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
}

.install-note {
    background: var(--bg-secondary, #232342);
    padding: 12px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-secondary, #888);
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.install-note i {
    color: #38ef7d;
    font-size: 16px;
}

/* Update Modal */
.update-modal .version-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    font-size: 16px;
}

.update-modal .old-version {
    color: var(--text-secondary, #888);
    text-decoration: line-through;
}

.update-modal .new-version {
    color: #38ef7d;
    font-weight: bold;
}

.update-modal .changelog {
    text-align: left;
    background: var(--bg-secondary, #232342);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.update-modal .changelog strong {
    color: var(--text-primary, white);
    font-size: 14px;
}

.update-modal .changelog ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.update-modal .changelog li {
    color: var(--text-secondary, #aaa);
    font-size: 13px;
    margin-bottom: 5px;
}

.forced-update-warning {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.update-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-update {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-update:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #0a1628;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary, #888);
    border: 1px solid var(--border-color, #333);
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--text-primary, white);
    color: var(--text-primary, white);
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.app-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #323232;
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    opacity: 0;
    transition: all 0.3s ease;
}

.app-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================
   ANIMACIONES
   ========================================== */

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

/* Ajustar contenido principal cuando hay banner de footer */
body.has-app-banner {
    padding-bottom: 80px;
}

@media (max-width: 480px) {
    body.has-app-banner {
        padding-bottom: 120px;
    }
}