/**
 * PWA Installer - HMVIP Landing
 *
 * Estilos leves, modernos e minimalistas para o banner/toast
 * de instalacao do Web App e o modal desktop de QR code.
 *
 * @package HMVIP\Landing
 * @since 1.2.5
 */

/* ============================================
   TOAST DE INSTALACAO
   ============================================ */

#hmvip-pwa-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    width: min(360px, calc(100vw - 40px));
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.32);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

#hmvip-pwa-toast.hmvip-pwa-toast--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#hmvip-pwa-toast .hmvip-pwa-toast__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

#hmvip-pwa-toast .hmvip-pwa-toast__icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(231, 43, 108, 0.16);
    color: #e72b6c;
    font-size: 15px;
}

#hmvip-pwa-toast .hmvip-pwa-toast__title {
    flex: 1 1 auto;
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
}

#hmvip-pwa-toast .hmvip-pwa-toast__close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

#hmvip-pwa-toast .hmvip-pwa-toast__close:hover,
#hmvip-pwa-toast .hmvip-pwa-toast__close:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

#hmvip-pwa-toast .hmvip-pwa-toast__text {
    margin: 0 0 12px 38px;
    color: rgba(255, 255, 255, 0.75);
}

#hmvip-pwa-toast .hmvip-pwa-toast__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: 38px;
}

#hmvip-pwa-toast .hmvip-pwa-toast__button {
    padding: 7px 14px;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

#hmvip-pwa-toast .hmvip-pwa-toast__button:hover,
#hmvip-pwa-toast .hmvip-pwa-toast__button:focus {
    opacity: 0.9;
    transform: translateY(-1px);
}

#hmvip-pwa-toast .hmvip-pwa-toast__button--primary {
    background: #e72b6c;
    color: #ffffff;
}

#hmvip-pwa-toast .hmvip-pwa-toast__button--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 7px 10px;
}

#hmvip-pwa-toast .hmvip-pwa-toast__button--ghost:hover,
#hmvip-pwa-toast .hmvip-pwa-toast__button--ghost:focus {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 480px) {
    #hmvip-pwa-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    #hmvip-pwa-toast .hmvip-pwa-toast__text,
    #hmvip-pwa-toast .hmvip-pwa-toast__actions {
        margin-left: 0;
    }
}

/* ============================================
   MODAL DESKTOP (QR CODE)
   ============================================ */

#hmvip-pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#hmvip-pwa-modal.hmvip-pwa-modal--visible {
    opacity: 1;
    pointer-events: auto;
}

#hmvip-pwa-modal .hmvip-pwa-modal__card {
    width: min(360px, 100%);
    padding: 24px;
    border-radius: 20px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    color: #ffffff;
    text-align: center;
    transform: scale(0.94);
    transition: transform 0.25s ease;
}

#hmvip-pwa-modal.hmvip-pwa-modal--visible .hmvip-pwa-modal__card {
    transform: scale(1);
}

#hmvip-pwa-modal .hmvip-pwa-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

#hmvip-pwa-modal .hmvip-pwa-modal__title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

#hmvip-pwa-modal .hmvip-pwa-modal__close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

#hmvip-pwa-modal .hmvip-pwa-modal__close:hover,
#hmvip-pwa-modal .hmvip-pwa-modal__close:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

#hmvip-pwa-modal .hmvip-pwa-modal__text {
    margin: 0 0 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

#hmvip-pwa-modal .hmvip-pwa-modal__qr-wrapper {
    margin: 0 auto 18px;
    text-align: center;
}

#hmvip-pwa-modal .hmvip-pwa-modal__qr {
    display: block;
    width: 140px;
    height: 140px;
    margin: 0 auto;
    padding: 8px;
    border-radius: 12px;
    background: #ffffff;
}

#hmvip-pwa-modal .hmvip-pwa-modal__qr-wrapper--fallback {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

#hmvip-pwa-modal .hmvip-pwa-modal__qr-fallback-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

#hmvip-pwa-modal .hmvip-pwa-modal__qr-fallback-link {
    word-break: break-all;
    font-size: 13px;
    color: #e72b6c;
    text-decoration: none;
}

#hmvip-pwa-modal .hmvip-pwa-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

#hmvip-pwa-modal .hmvip-pwa-modal__button {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
    text-decoration: none;
}

#hmvip-pwa-modal .hmvip-pwa-modal__button:hover,
#hmvip-pwa-modal .hmvip-pwa-modal__button:focus {
    opacity: 0.9;
    transform: translateY(-1px);
}

#hmvip-pwa-modal .hmvip-pwa-modal__button--primary {
    background: #e72b6c;
    color: #ffffff;
}

#hmvip-pwa-modal .hmvip-pwa-modal__button--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

#hmvip-pwa-modal .hmvip-pwa-modal__button--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    padding: 6px 12px;
}

#hmvip-pwa-modal .hmvip-pwa-modal__button--ghost:hover,
#hmvip-pwa-modal .hmvip-pwa-modal__button--ghost:focus {
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   FLOATING ACTION BUTTON (FAB)
   ============================================ */

#hmvip-pwa-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999998;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #e72b6c;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(231, 43, 108, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#hmvip-pwa-fab:hover,
#hmvip-pwa-fab:focus {
    transform: scale(1.06);
    opacity: 0.92;
}

#hmvip-pwa-fab .hmvip-pwa-fab__icon {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
}

@media (max-width: 480px) {
    #hmvip-pwa-fab {
        bottom: 16px;
        right: 16px;
    }
}
