/* --- ERIC: INTERFACE DE ÉLITE (APPLE STYLE) --- */

/* 1. Contenedor Maestro: Ocupa toda la pantalla, invisible por defecto */
#royal-bot {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh; /* Dynamic Viewport Height para móviles */
    z-index: 9999 !important; /* Por encima de cinema-bars y mansion */
    display: none; 
    justify-content: center;
    align-items: flex-end; /* Aparece desde abajo como en iOS */
    background: rgba(245, 245, 247, 0.6); 
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
}

#royal-bot.active {
    display: flex !important;
}

/* 2. La Ventana de Chat (Apple Sheet) */
.bot-window {
    width: 100%;
    max-width: 500px;
    height: 90vh; /* No ocupa el 100% para dejar ver el fondo */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(25px);
    border-radius: 40px 40px 0 0; /* Solo arriba para simular que sale del suelo */
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    position: relative;
    animation: apple-slide-up 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* 3. Área de Mensajes */
.bot-chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: none;
}
.bot-chat-area::-webkit-scrollbar { display: none; }

/* 4. Burbujas de Estilo Apple */
.msg.bot {
    background: #ffffff;
    padding: 18px 24px;
    border-radius: 22px;
    max-width: 85%;
    align-self: flex-start;
    color: #1d1d1f;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
}

.msg.user {
    background: #000000;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 20px 20px 4px 20px;
    align-self: flex-end;
    font-weight: 500;
    font-size: 0.9rem;
}

/* 5. Input Estilo iMessage */
.bot-input-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 30px;
    padding: 8px 8px 8px 20px;
    margin: 10px 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bot-input-field {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
}

.send-btn {
    background: var(--accent-gold, #b39359);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 6. Botones de Opción */
.interaction-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.opt-btn-lux {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 16px 20px;
    border-radius: 18px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-align: left;
    transition: all 0.2s;
    cursor: pointer;
}
.opt-btn-lux:hover {
    background: #f5f5f7;
    border-color: #b39359;
}

.close-bot {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0,0,0,0.05);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    z-index: 10;
    transition: 0.2s;
}
.close-bot:hover { background: rgba(0,0,0,0.1); }

/* Animación de entrada */
@keyframes apple-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}