/* PWA Installer Modern Styles */

/* Header Button */
.pwa-header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--button-color, #FF6B6B) 0%, var(--button-color-dark, #FF5252) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    margin-left: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pwa-header-button:hover {
    background: linear-gradient(135deg, var(--button-color-dark, #FF5252) 0%, var(--button-color-darker, #FF3333) 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.pwa-header-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pwa-header-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

/* Floating Button Container */
.pwa-floating-button-container {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Floating Button */
.pwa-floating-button {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--button-color, #FF6B6B) 0%, var(--button-color-dark, #FF5252) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15), 
        0 8px 24px rgba(255, 107, 107, 0.25),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    border: none;
    font-weight: 600;
    user-select: none;
    text-decoration: none;
    padding: 0;
    animation: pwa-float 3s ease-in-out infinite;
    position: fixed;
}

.pwa-floating-button svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.pwa-floating-button:hover {
    background: linear-gradient(135deg, var(--button-color-dark, #FF5252) 0%, var(--button-color-darker, #FF3333) 100%);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.2), 
        0 12px 32px rgba(255, 107, 107, 0.35),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    transform: scale(1.12);
}

.pwa-floating-button:hover svg {
    transform: translateY(-2px);
}

.pwa-floating-button:active {
    transform: scale(0.95);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.15), 
        0 4px 8px rgba(255, 107, 107, 0.2);
}

.pwa-floating-button:focus {
    outline: none;
    box-shadow: 
        0 0 0 4px rgba(255, 107, 107, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(255, 107, 107, 0.25);
}

/* Floating Animation */
@keyframes pwa-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Floating Button Positions */
.pwa-floating-button.bottom-right {
    bottom: 24px;
    right: 24px;
}

.pwa-floating-button.bottom-left {
    bottom: 24px;
    left: 24px;
}

.pwa-floating-button.top-right {
    top: 24px;
    right: 24px;
}

.pwa-floating-button.top-left {
    top: 24px;
    left: 24px;
}

/* Responsive for mobile */
@media (max-width: 768px) {
    .pwa-floating-button {
        width: 64px;
        height: 64px;
        bottom: 20px !important;
        right: 20px !important;
    }
    
    .pwa-floating-button svg {
        width: 24px;
        height: 24px;
    }
}

/* PWA Install Modal/Dialog */
.pwa-install-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pwa-install-modal.show {
    opacity: 1;
    visibility: visible;
}

.pwa-install-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-install-modal-header {
    background: linear-gradient(135deg, var(--theme-color, #FF6B6B) 0%, var(--theme-color-dark, #FF5252) 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.pwa-install-modal-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.pwa-install-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.pwa-install-modal-body {
    padding: 24px;
}

.pwa-install-modal-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.pwa-install-modal-footer {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
}

.pwa-install-button,
.pwa-cancel-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pwa-install-button {
    background: linear-gradient(135deg, var(--button-color, #FF6B6B) 0%, var(--button-color-dark, #FF5252) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.pwa-install-button:hover {
    background: linear-gradient(135deg, var(--button-color-dark, #FF5252) 0%, var(--button-color-darker, #FF3333) 100%);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
}

.pwa-cancel-button {
    background: #f0f0f0;
    color: #333;
}

.pwa-cancel-button:hover {
    background: #e0e0e0;
}

/* Responsive */
@media (max-width: 640px) {
    .pwa-header-button {
        padding: 10px 16px;
        font-size: 12px;
        margin-left: 5px;
    }

    .pwa-floating-button {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .pwa-floating-button.bottom-right,
    .pwa-floating-button.bottom-left,
    .pwa-floating-button.top-right,
    .pwa-floating-button.top-left {
        bottom: 16px;
        right: 16px;
        left: auto;
        top: auto;
    }

    .pwa-install-modal-content {
        max-width: 95%;
    }
}
    transform: scale(1.1);
}

.pwa-floating-button:active {
    transform: scale(0.95);
}

/* Posiciones del botón flotante */
.pwa-floating-button.bottom-right {
    bottom: 20px;
    right: 20px;
}

.pwa-floating-button.bottom-left {
    bottom: 20px;
    left: 20px;
}

.pwa-floating-button.top-right {
    top: 20px;
    right: 20px;
}

.pwa-floating-button.top-left {
    top: 20px;
    left: 20px;
}

/* Modal para PWA Install */
.pwa-install-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}

.pwa-install-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pwa-modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    text-align: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    border: none;
    background: none;
}

.pwa-modal-close:hover {
    color: #000;
}

.pwa-modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.pwa-modal-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.pwa-modal-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.pwa-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pwa-install-btn,
.pwa-cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pwa-install-btn {
    background-color: #FF6B6B;
    color: white;
    flex: 1;
}

.pwa-install-btn:hover {
    background-color: #FF5252;
}

.pwa-cancel-btn {
    background-color: #f0f0f0;
    color: #333;
    flex: 1;
}

.pwa-cancel-btn:hover {
    background-color: #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .pwa-header-button {
        padding: 8px 16px;
        font-size: 14px;
        margin-left: 5px;
    }
    
    .pwa-floating-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .pwa-floating-button.bottom-right {
        bottom: 10px;
        right: 10px;
    }
    
    .pwa-floating-button.bottom-left {
        bottom: 10px;
        left: 10px;
    }
    
    .pwa-floating-button.top-right {
        top: 10px;
        right: 10px;
    }
    
    .pwa-floating-button.top-left {
        top: 10px;
        left: 10px;
    }
    
    .pwa-modal-content {
        max-width: 90%;
        margin: 20px;
    }
}
