/**
 * HMVIP BuddyBoss Integration Styles
 *
 * Estilos para integração com BuddyBoss Platform:
 * - Badges de tier nos perfis
 * - Modais de upgrade e limites
 * - Notificações e alertas
 *
 * NOTA: Tier selector no formulário de atividade foi removido.
 * Oficial: NativeTierSelectorModule (hmvip-media-manager).
 *
 * @since 2.0.0
 * @package HMVIP\Subscriptions
 */

/* ==========================================================================
   Badges de Tier nos Perfis
   ========================================================================== */

.hmvip-tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.hmvip-tier-badge.intimate {
    background: #fff3cd;
    color: #856404;
}

.hmvip-tier-badge.boyfriend {
    background: #f8d7da;
    color: #721c24;
}

.hmvip-profile-tier-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.hmvip-profile-tier-badge.intimate {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.hmvip-profile-tier-badge.boyfriend {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.hmvip-profile-tier-badge .tier-icon {
    font-size: 16px;
}

/* ==========================================================================
    Botões de Upgrade & VIP Checkout
    ========================================================================== */

.hmvip-upgrade-btn,
.hmvip-checkout-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.hmvip-upgrade-btn:hover,
.hmvip-checkout-button:hover {
    background: linear-gradient(135deg, #005a87, #004066);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.hmvip-upgrade-btn:disabled,
.hmvip-checkout-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 🎯 NOVO: Estilo específico para botão VIP de Grupos */
.hmvip-vip-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hmvip-vip-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.4);
}

/* Ocultar botões nativos de "Request Membership" que não foram substituídos */
.bp-groups-list-item .group-button:not(.hmvip-checkout-button):not(.hmvip-vip-button) {
    display: none !important;
}

/* ==========================================================================
   Informações de Limite de Mensagem
   ========================================================================== */

.hmvip-message-limit-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.hmvip-message-limit-info .tier-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.hmvip-message-limit-info .limit-text {
    color: #6c757d;
    font-weight: 500;
}

/* ==========================================================================
   Conteúdo Protegido
   ========================================================================== */

.hmvip-login-required,
.hmvip-upgrade-required {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    margin: 20px 0;
}

.hmvip-login-required p,
.hmvip-upgrade-required p {
    margin: 10px 0;
    color: #495057;
}

.hmvip-login-required strong,
.hmvip-upgrade-required strong {
    color: #212529;
}

.hmvip-login-required .button,
.hmvip-upgrade-required .button {
    margin-top: 15px;
}

/* ==========================================================================
   Modais
   ========================================================================== */

.hmvip-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.hmvip-modal.show {
    opacity: 1;
    visibility: visible;
}

.hmvip-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.hmvip-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.hmvip-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.hmvip-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.hmvip-modal-title .modal-icon {
    font-size: 20px;
}

.hmvip-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.hmvip-modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.hmvip-modal-body {
    padding: 24px;
}

.hmvip-modal-message {
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 16px;
    white-space: pre-line;
}

.hmvip-modal-creator {
    font-weight: 600;
    color: #007cba;
    font-size: 14px;
}

.hmvip-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.hmvip-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.hmvip-btn-primary {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
}

.hmvip-btn-primary:hover {
    background: linear-gradient(135deg, #005a87, #004066);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.hmvip-btn-secondary {
    background: #6c757d;
    color: white;
}

.hmvip-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* ==========================================================================
   Notificações
   ========================================================================== */

.hmvip-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000000;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hmvip-notification.show {
    transform: translateX(0);
}

.hmvip-notification-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.hmvip-notification-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.hmvip-notification-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.hmvip-notification-content {
    flex: 1;
    font-weight: 500;
}

.hmvip-notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.hmvip-notification-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Responsividade
   ========================================================================== */

@media (max-width: 768px) {
    .hmvip-tier-options {
        flex-direction: column;
        gap: 8px;
    }

    .hmvip-modal-content {
        width: 95%;
        margin: 20px;
    }

    .hmvip-modal-header,
    .hmvip-modal-body,
    .hmvip-modal-footer {
        padding: 16px;
    }

    .hmvip-modal-footer {
        flex-direction: column;
    }

    .hmvip-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }

    .hmvip-notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .hmvip-message-limit-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .hmvip-upgrade-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Animações e Transições
   ========================================================================== */

.hmvip-profile-tier-badge {
    animation: badgeSlideIn 0.5s ease;
}

@keyframes badgeSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   Estados de Loading
   ========================================================================== */

.hmvip-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.hmvip-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Integração com BuddyBoss Theme
   ========================================================================== */

/* Ajustes específicos para o tema BuddyX Pro */
.buddyx-pro .hmvip-modal-content {
    background: var(--bb-bg-color, white);
}

.buddyx-pro .hmvip-btn-primary {
    background: var(--bb-primary-color, #007cba);
}

/* Ajustes para modo escuro */
@media (prefers-color-scheme: dark) {
    .hmvip-modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }

    .hmvip-modal-header,
    .hmvip-modal-footer {
        background: #1a202c;
        border-color: #4a5568;
    }

}
