/* =================================
   PERFIL DE USUARIO MEJORADO
   ================================= */

/* Contenedor principal del perfil */
.wptc-user-profile {
    position: relative;
    background: linear-gradient(135deg, #0a1a14 0%, #1a2e27 50%, #214a3c 100%);
    border: 1px solid rgba(0, 198, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    overflow: visible; /* Changed from hidden to visible */
    transition: all 0.3s ease;
    width: 100%;
    min-width: 280px; /* Ensure minimum width for content */
}

.wptc-user-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 198, 255, 0.05) 0%, rgba(0, 114, 255, 0.05) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wptc-user-profile:hover::before {
    opacity: 1;
}

.wptc-user-profile:hover {
    border-color: rgba(0, 198, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 198, 255, 0.15);
}

/* Avatar mejorado */
.wptc-user-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid transparent;
    background: linear-gradient(45deg, #00c6ff, #0072ff) padding-box,
                linear-gradient(45deg, #00c6ff, #0072ff) border-box;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wptc-user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 198, 255, 0.4);
}

.wptc-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.wptc-user-avatar::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #00ff88, #00c6ff);
    border: 2px solid #0a1a14;
    border-radius: 50%;
    animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Información del usuario */
.wptc-user-info {
    flex: 1;
    margin-left: 16px;
    min-width: 0; /* Allow flex item to shrink */
    overflow: visible; /* Ensure content is not cut */
}

.wptc-user-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: visible; /* Ensure text is not cut */
    text-overflow: clip; /* Don't use ellipsis */
}

.wptc-user-plan {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    margin: 4px 0;
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: visible; /* Ensure text is not cut */
    min-width: fit-content; /* Ensure minimum width for content */
}

/* Estilos específicos por plan */
.wptc-plan-free {
    background: linear-gradient(135deg, rgba(142, 205, 183, 0.2) 0%, rgba(142, 205, 183, 0.1) 100%);
    color: #8ecdb7;
    border: 1px solid rgba(142, 205, 183, 0.3);
}

.wptc-plan-traveler {
    background: linear-gradient(135deg, rgba(0, 198, 255, 0.2) 0%, rgba(0, 198, 255, 0.1) 100%);
    color: #00c6ff;
    border: 1px solid rgba(0, 198, 255, 0.3);
}

.wptc-plan-explorer {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.wptc-plan-premium {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, rgba(138, 43, 226, 0.1) 100%);
    color: #8a2be2;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.wptc-user-plan:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Estadísticas del usuario */
.wptc-user-stats {
    display: flex;
    gap: 8px; /* Reduced from 16px to 8px */
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 198, 255, 0.1);
    overflow: hidden; /* Prevent overflow */
}

.wptc-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px; /* Reduced from 4px to 2px */
    padding: 6px 8px; /* Reduced from 8px 12px to 6px 8px */
    background: rgba(0, 198, 255, 0.05);
    border-radius: 6px; /* Reduced from 8px to 6px */
    border: 1px solid rgba(0, 198, 255, 0.1);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0; /* Allow shrinking */
    overflow: hidden; /* Prevent text overflow */
}

.wptc-stat-item:hover {
    background: rgba(0, 198, 255, 0.1);
    border-color: rgba(0, 198, 255, 0.2);
    transform: translateY(-2px);
}

.wptc-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #00c6ff;
    line-height: 1;
}

.wptc-stat-label {
    font-size: 10px; /* Reduced from 11px to 10px */
    font-weight: 500;
    color: #8ecdb7;
    text-align: center;
    line-height: 1.1; /* Reduced from 1.2 to 1.1 */
    word-wrap: break-word; /* Allow word breaking */
    overflow: hidden; /* Prevent overflow */
    text-overflow: ellipsis; /* Add ellipsis if needed */
}

/* Botones de acción rápida */
.wptc-user-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.wptc-action-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.wptc-btn-profile {
    background: linear-gradient(135deg, rgba(0, 198, 255, 0.2) 0%, rgba(0, 114, 255, 0.2) 100%);
    color: #00c6ff;
    border: 1px solid rgba(0, 198, 255, 0.3);
}

.wptc-btn-profile:hover {
    background: linear-gradient(135deg, rgba(0, 198, 255, 0.3) 0%, rgba(0, 114, 255, 0.3) 100%);
    border-color: rgba(0, 198, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 198, 255, 0.2);
}

.wptc-btn-upgrade {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #1a1a1a;
    border: 1px solid #ffd700;
}

.wptc-btn-upgrade:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* Animaciones de entrada */
@keyframes slideInProfile {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wptc-user-profile {
    animation: slideInProfile 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .wptc-user-profile {
        padding: 16px;
        min-width: 260px; /* Ensure minimum width on mobile */
    }
    
    .wptc-user-avatar {
        width: 56px;
        height: 56px;
    }
    
    .wptc-user-name {
        font-size: 16px;
        white-space: nowrap; /* Maintain no wrapping on mobile */
    }
    
    .wptc-user-plan {
        font-size: 11px; /* Slightly smaller on mobile but still readable */
        white-space: nowrap;
    }
    
    .wptc-user-stats {
         gap: 6px; /* Further reduced for mobile */
         flex-wrap: wrap; /* Allow wrapping on very small screens */
     }
     
     .wptc-stat-item {
         padding: 4px 6px; /* Even smaller padding on mobile */
         min-width: 70px; /* Minimum width to prevent too much shrinking */
     }
     
     .wptc-stat-label {
         font-size: 9px; /* Smaller font on mobile */
         line-height: 1.0;
     }
    
    .wptc-stat-value {
        font-size: 16px;
    }
    
    .wptc-action-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Efectos especiales para planes premium */
.wptc-plan-explorer .wptc-user-profile,
.wptc-plan-premium .wptc-user-profile {
    position: relative;
    overflow: hidden;
}

.wptc-plan-explorer .wptc-user-profile::after,
.wptc-plan-premium .wptc-user-profile::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

.wptc-plan-premium .wptc-user-profile::after {
    background: linear-gradient(45deg, transparent, rgba(138, 43, 226, 0.1), transparent);
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}