/* assets/css/chatbot.css - Estilos del Asistente Virtual Inteligente de Arcángel Beauty & Fashion */

.arcangel-chat-launcher {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.arcangel-chat-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c98086 0%, #d4af37 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 25px rgba(201, 128, 134, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.arcangel-chat-btn:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 12px 30px rgba(201, 128, 134, 0.6);
}

.arcangel-chat-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #10b981;
    color: white;
    border: 2px solid white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseBadge 2s infinite;
}

.arcangel-chat-tooltip {
    background: #ffffff;
    color: #1e293b;
    padding: 0.5rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid #fecdd3;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    animation: bounceIn 0.5s ease-out;
}

/* Ventana Principal del Chatbot */
.arcangel-chat-window {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 400px;
    max-width: calc(100vw - 30px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(212, 175, 55, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    animation: slideUpFade 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.arcangel-chat-window.active {
    display: flex;
}

/* Header del Chatbot */
.arcangel-chat-header {
    background: linear-gradient(135deg, #1e1b18 0%, #2e2621 100%);
    color: #ffffff;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #d4af37;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d4af37;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-title-box h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.chat-status {
    font-size: 0.75rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.chat-header-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Área de Mensajes */
.arcangel-chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    background: #fdfaf8;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

/* Mensajes */
.chat-msg {
    display: flex;
    gap: 0.6rem;
    max-width: 88%;
    animation: msgFadeIn 0.3s ease-out;
}

.chat-msg.bot {
    align-self: flex-start;
}

.chat-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #d4af37;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.45;
    position: relative;
    word-break: break-word;
}

.chat-msg.bot .chat-bubble {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #f1ece7;
    border-bottom-left-radius: 0.3rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.chat-msg.user .chat-bubble {
    background: linear-gradient(135deg, #c98086, #b46f75);
    color: #ffffff;
    border-bottom-right-radius: 0.3rem;
    box-shadow: 0 4px 12px rgba(201, 128, 134, 0.3);
}

/* Typing Indicator */
.chat-typing {
    display: none;
    align-self: flex-start;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #eee;
    font-size: 0.8rem;
    color: #64748b;
}

.chat-typing.active {
    display: inline-flex;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #d4af37;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Chips de Opciones Rápidas */
.chat-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
}

.chat-chip {
    background: #ffffff;
    border: 1.5px solid #ebd9c8;
    color: #2b2521;
    padding: 0.65rem 0.9rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.chat-chip:hover {
    background: #fff7ed;
    border-color: #d4af37;
    transform: translateX(3px);
}

/* Tarjeta de Servicio Interactivo */
.chat-service-card {
    background: #ffffff;
    border: 1.5px solid #fecdd3;
    border-radius: 0.85rem;
    padding: 0.75rem 0.9rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.chat-service-card:hover {
    border-color: #c98086;
    background: #fff1f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(201, 128, 134, 0.15);
}

.chat-service-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.chat-service-category {
    font-size: 0.7rem;
    font-weight: 800;
    color: #c98086;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-service-price {
    font-size: 1rem;
    font-weight: 800;
    color: #d4af37;
}

.chat-service-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.chat-service-meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Contenedor de Horarios Disponibles */
.chat-slots-container {
    background: #ffffff;
    border: 1px solid #eedcd0;
    border-radius: 1rem;
    padding: 0.85rem;
    margin-top: 0.5rem;
}

.chat-slots-header {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #b07d62;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.chat-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.chat-slot-btn {
    background: #fdfaf7;
    border: 1px solid #ebd8c8;
    color: #2b2521;
    padding: 0.45rem 0.2rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.chat-slot-btn:hover {
    background: #c98086;
    color: #ffffff;
    border-color: #c98086;
    transform: scale(1.05);
}

.chat-slots-hint {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    background: #f8fafc;
    padding: 0.4rem 0.6rem;
    border-radius: 0.4rem;
    border-left: 3px solid #d4af37;
    line-height: 1.3;
}

/* Tarjeta de Resumen & Confirmación */
.chat-summary-card {
    background: #ffffff;
    border: 2px solid #d4af37;
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.12);
}

.chat-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.chat-summary-row:last-child {
    border-bottom: none;
    font-weight: 800;
    font-size: 1rem;
    color: #c98086;
    padding-top: 0.5rem;
}

.chat-confirm-btn {
    width: 100%;
    background: linear-gradient(135deg, #c98086 0%, #d4af37 100%);
    color: #ffffff;
    border: none;
    padding: 0.75rem;
    border-radius: 0.6rem;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(201, 128, 134, 0.3);
}

.chat-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(201, 128, 134, 0.45);
}

/* Ticket de Cita Confirmada */
.chat-ticket {
    background: #ffffff;
    border: 2px dashed #10b981;
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    text-align: center;
    margin-top: 0.5rem;
    position: relative;
}

.ticket-icon {
    width: 48px;
    height: 48px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 0.5rem auto;
}

.ticket-number {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.ticket-details {
    background: #f8fafc;
    border-radius: 0.6rem;
    padding: 0.6rem;
    margin: 0.75rem 0;
    font-size: 0.82rem;
    text-align: left;
    line-height: 1.5;
}

.ticket-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: #25D366;
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 0.6rem;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.2s;
}

.ticket-wa-btn:hover {
    background: #20bd5a;
    transform: translateY(-2px);
}

/* Barra Inferior de Entrada de Texto */
.arcangel-chat-footer {
    background: #ffffff;
    border-top: 1px solid #eee;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 2rem;
    border: 1.5px solid #e2e8f0;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: #c98086;
}

.chat-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c98086, #d4af37);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.08);
}

/* Animaciones */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes msgFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
    .arcangel-chat-window {
        right: 12px;
        left: 12px;
        bottom: 85px;
        width: auto;
        height: calc(100vh - 100px);
        max-height: none;
    }
    .arcangel-chat-launcher {
        right: 15px;
        bottom: 15px;
    }
}
