/**
 * ALWAYS PRETTY STORE LLC - VESPER OS 6.5
 * FILE: musa_chat_styles_v3.css
 * TOTAL UNIFIED STYLES - FULL VERSION
 */

 :root { 
    --g: #B89114; 
    --bg: rgba(10,10,10,0.98); 
    --gold-grad: linear-gradient(135deg, #B89114 0%, #FFD700 100%); 
}

/* --- 1. CONTENEDORES PRINCIPALES (DESKTOP) --- */
.chat-floating-container { 
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    width: 360px; 
    height: 85vh; 
    max-height: 600px; 
    z-index: 2147483647 !important; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.chat-hidden { transform: translateY(110%) scale(0.9); opacity: 0; pointer-events: none; }

.chat-glass-card { 
    background: var(--bg); 
    backdrop-filter: blur(25px); 
    border: 1px solid rgba(184,145,20,0.3); 
    border-radius: 20px; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    position: relative; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* --- 2. HEADER E IDENTIDAD --- */
.chat-header-v2 { 
    padding: 12px 15px; 
    background: rgba(184,145,20,0.1); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid rgba(184,145,20,0.1); 
}

.musa-identity { display: flex; flex-direction: column; justify-content: center; }
.gold-name { font-family: 'Cinzel', serif; font-weight: 800; color: var(--g); font-size: 1rem; }
.musa-stats-row { font-size: 10px; opacity: 0.8; display: flex; gap: 8px; color: #fff; }
.avatar-main { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--g); object-fit: cover; }

.close-btn-gold { 
    background: rgba(184,145,20,0.2); border: 1px solid var(--g); color: var(--g); 
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; 
}

/* --- 3. CUERPO DEL CHAT (MENSAJES) --- */
.chat-content { 
    flex-grow: 1; padding: 15px; overflow-y: auto; background: #050505; 
    display: flex; flex-direction: column; gap: 12px; 
}

.msg { padding: 10px 14px; border-radius: 18px; font-size: 0.9rem; max-width: 85%; line-height: 1.4; position: relative; }
.msg.musa { 
    align-self: flex-start; background: #1a1a1a; color: #fff; 
    margin-left: 10px; border-bottom-left-radius: 4px; 
    border: 0.5px solid rgba(184,145,20,0.2); 
}
.msg.user { 
    align-self: flex-end; background: var(--g); color: #000; 
    font-weight: 700; border-bottom-right-radius: 4px; 
}

/* --- 4. FOOTER Y BOTONES DE VENTA --- */
.chat-footer-v3 { padding: 0; background: #0a0a0a; border-top: 1px solid rgba(184,145,20,0.1); }

/* Nuevo Action Grid Unificado */
.musa-action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
    background: rgba(12, 12, 12, 0.95);
    border-top: 1px solid rgba(184, 145, 20, 0.2);
}

.action-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(184, 145, 20, 0.3);
    border-radius: 10px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.action-item:hover { background: rgba(184, 145, 20, 0.15); transform: translateY(-2px); }
.action-item.locked { border-color: rgba(255, 255, 255, 0.1); filter: grayscale(0.5); }
.act-icon { font-size: 18px; margin-bottom: 4px; }
.act-label { font-size: 8px; font-weight: 800; color: var(--g); letter-spacing: 0.5px; text-transform: uppercase; }
.act-lock { position: absolute; top: 4px; right: 4px; font-size: 8px; opacity: 0.7; }

/* Efecto de parpadeo para el botón de saludo gratis */
.action-item-greeting { animation: action-glow-btn 3s infinite; }
@keyframes action-glow-btn {
    0%, 100% { border-color: rgba(184, 145, 20, 0.3); }
    50% { border-color: var(--g); box-shadow: 0 0 10px rgba(184, 145, 20, 0.2); }
}

.gift-showcase-row {
    display: flex; align-items: center; gap: 6px; padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(184, 145, 20, 0.2);
}

.gift-btn-mini {
    flex: 1; height: 45px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 12px; border: 1px solid rgba(184, 145, 20, 0.4);
    background: #000; color: var(--g); cursor: pointer; transition: all 0.3s ease;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.gift-btn-mini .gift-price { font-size: 0.9rem; font-weight: 800; line-height: 1; }
.gift-btn-mini small { font-size: 0.6rem; font-weight: 400; opacity: 0.9; }

.vip-gold { 
    background: var(--gold-grad) !important; color: #000 !important; 
    border: none !important; box-shadow: 0 4px 15px rgba(184, 145, 20, 0.3); 
}

.chat-input-area { padding: 10px 12px 15px 12px; background: #000; display: flex; gap: 10px; align-items: center; }
.chat-input-area input { 
    flex: 1; background: #111; border: 1px solid #333; 
    border-radius: 25px; padding: 12px 18px; color: #fff; font-size: 15px; 
}

#btn-send-chat { 
    width: 42px; height: 42px; border-radius: 50%; 
    background: var(--g); border: none; cursor: pointer; font-size: 18px; 
}

/* --- 5. LOGICA PAYWALL --- */
.offers-container-hidden {
    display: none; flex: 1; gap: 6px; opacity: 0;
    transform: translateY(10px); transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.offers-container-visible { display: flex !important; opacity: 1; transform: translateY(0); }

/* --- 6. ANIMACIONES Y EFECTOS --- */
.status-pill-live {
    background: rgba(0, 255, 102, 0.1);
    color: #00ff66;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 255, 102, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
    animation: live-pulse 2s infinite;
    letter-spacing: 1px;
}

.live-dot-pulse {
    width: 6px; height: 6px; background: #00ff66; border-radius: 50%; box-shadow: 0 0 8px #00ff66;
}

@keyframes live-pulse {
    0% { opacity: 1; box-shadow: 0 0 10px rgba(0, 255, 102, 0.2); }
    50% { opacity: 0.6; box-shadow: 0 0 15px rgba(0, 255, 102, 0.5); }
    100% { opacity: 1; box-shadow: 0 0 10px rgba(0, 255, 102, 0.2); }
}

.live-dot-neon {
    height: 6px; width: 6px; background-color: #00ff00; border-radius: 50%;
    display: inline-block; box-shadow: 0 0 8px #00ff00;
    animation: blink-live-status 1.5s infinite;
}

@keyframes blink-live-status {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(0.8); }
}

.offer-glow {
    position: relative; overflow: hidden;
    animation: gold-pulse-button 2.5s infinite;
}

@keyframes gold-pulse-button {
    0%, 100% { box-shadow: 0 0 5px rgba(184, 145, 20, 0.4); }
    50% { box-shadow: 0 0 18px rgba(184, 145, 20, 0.9); border-color: #f1d56e; }
}

.offer-glow::after {
    content: ''; position: absolute; top: -50%; left: -150%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg); animation: shine-sweep 3.5s infinite;
}

@keyframes shine-sweep {
    0% { left: -150%; }
    100% { left: 150%; }
}

/* --- 7. RESPONSIVE MOBILE --- */
@media screen and (max-width: 768px) {
    .chat-floating-container { bottom: 0; right: 0; width: 100%; height: 100%; max-height: 100vh; border-radius: 0; }
    .chat-glass-card { border-radius: 0; border: none; }
    .chat-content { height: calc(100vh - 220px); padding-bottom: env(safe-area-inset-bottom); }
    .chat-header-v2 { padding-top: env(safe-area-inset-top); }
    .chat-input-area { padding-bottom: calc(15px + env(safe-area-inset-bottom)); }
}
@keyframes heartFlyUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-300px) scale(1.5) rotate(20deg); opacity: 0; }
}
/* --- UNIFICACIÓN DE ANCHOS (HEADER) --- */

.status-pill-live, 
.btn-header-modern {
    width: 85px !important; /* Ancho fijo idéntico para los tres */
    height: 22px !important;
    box-sizing: border-box !important; /* Evita que el padding o border ensanche el botón */
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 8.5px !important;
    border-radius: 3px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Estilo específico para los botones de acción */
.btn-header-modern {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(184, 145, 20, 0.3);
    color: #cecece;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    font-family: 'Montserrat', sans-serif;
}

.btn-header-modern:hover {
    background: rgba(184, 145, 20, 0.2);
    border-color: #B89114;
    color: #fff;
    box-shadow: 0 0 10px rgba(184, 145, 20, 0.2);
}

.btn-close-modern:hover {
    background: rgba(255, 50, 50, 0.2);
    border-color: #ff3232;
    box-shadow: 0 0 10px rgba(255, 50, 50, 0.2);
}

/* Mantener el diseño de tu Live original pero con el nuevo ancho */
.status-pill-live {
    /* Aquí se mantiene tu color de fondo original de la clase status-pill-live */
    border: 1px solid rgba(184,145,20,0.5); 
}

/* --- TUS OTROS ESTILOS --- */
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@media (min-width: 1024px) {
    #musa-chat-wrapper {
        bottom: 20px !important;
        top: auto !important;
        right: 20px !important;
        height: 600px !important;
    }
}

.sugg-pill {
    background: rgba(184,145,20,0.1);
    border: 1px solid rgba(184,145,20,0.3);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}
.offer-glow-gold {
    background: linear-gradient(45deg, #B89114, #FFD700);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(184, 145, 20, 0.6);
    transition: all 0.3s ease;
    animation: goldGlow 2s infinite;
}

@keyframes goldGlow {
    0% { box-shadow: 0 0 5px #B89114; transform: scale(1); }
    50% { box-shadow: 0 0 20px #FFD700; transform: scale(1.05); }
    100% { box-shadow: 0 0 5px #B89114; transform: scale(1); }
}

.offer-glow-gold:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}
.heart-particle {
    position: absolute;
    bottom: 20px;
    font-size: 20px;
    z-index: 9999; /* Por encima de todo */
    pointer-events: none;
    user-select: none;
}

@keyframes heartFlyUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-300px) scale(1.5); opacity: 0; }
}
@keyframes heartFlyUp {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-500px) scale(2.5) rotate(20deg);
        opacity: 0;
    }
}
/* Contenedor de botones */
.chat-options-container {
    display: flex;
    gap: 12px;
    padding: 15px;
    justify-content: center;
    flex-wrap: wrap;
    z-index: 1000;
    position: relative;
}

/* Botón Dorado Premium */
.chat-opt-btn {
    background: linear-gradient(135deg, #D4AF37 0%, #F9F295 50%, #D4AF37 100%);
    border: 1px solid #B8860B;
    color: #000 !important;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 1px;
}

.chat-opt-btn:hover {
    transform: scale(1.1) rotate(-1deg);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    filter: brightness(1.2);
}

.chat-opt-btn:active {
    transform: scale(0.95);
}