:root {
    color-scheme: light;
    --primary: #1f4f7c;
    --primary-dark: #163a5f;
    --accent: #5aa9e6;
    --surface: #ffffff;
    --surface-muted: #f4f7fb;
    --text: #1d2a3a;
    --border: #d6e2f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #f5f9ff 0%, #eef4fb 100%);
    color: var(--text);
}

.chatbot-widget {
    position: fixed;
      top: 65%;
      right: 0;
      padding: 75px 0px;
      z-index: 1007;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 45px;
      height: 50px;
}


    
.chatbot-toggle {
    border: 0;
    border-radius: 12px 0 0 12px;
    padding: 0.9rem 0.4rem;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(31, 79, 124, 0.25);
}

.chatbot-toggle:hover {
    background: var(--primary-dark);
}

.chatbot-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.chatbot-panel {
    position: absolute;
    right: calc(100% + 1rem);
    top: -50%;
    transform: translateY(-50%);
    width: min(360px, calc(100vw - 2rem));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(17, 34, 56, 0.16);
}

.chatbot-header {
    background: var(--primary);
    color: white;
    padding: 1rem 1rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.chatbot-header-buttons {
    display: flex;
    gap: 0.5rem;
}

.chatbot-clear {
    border: none;
    background: transparent;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chatbot-clear:hover {
    opacity: 1;
}

.chatbot-close {
    border: none;
    background: transparent;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chatbot-close:hover {
    color: #e7191f ;
    opacity: 1;
}

.chatbot-header p {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    opacity: 0.85;
}

.chatbot-messages {
    min-height: 220px;
    max-height: 320px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--surface-muted);
}

.chatbot-quick-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0.75rem 0 0 0;
}

.chatbot-quick-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-quick-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.chatbot-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    /* Espacio consistente entre el texto y los botones */
    margin: 1rem 0 0 0;
}


.chatbot-action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    display: inline-block;
}

.chatbot-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.welcome-notification {
    position: fixed;
    bottom: auto;
    right: 20px;
    top: 65%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(31, 79, 124, 0.3);
    max-width: 280px;
    z-index: 999;
    animation: slideUp 0.4s ease-out;
    margin-right: 60px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.welcome-notification.fade-out {
    animation: fadeOut 0.4s ease-out forwards;
}

.chat-bubble {
    max-width: 85%;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    margin-bottom: 0.7rem;
    line-height: 1.45;
    font-size: 0.95rem;
}

.chat-bubble.user {
    background: var(--accent);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.bot {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chatbot-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem;
    background: white;
}

.chatbot-form input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
}

.chatbot-form button {
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    padding: 0.7rem 0.95rem;
    cursor: pointer;
}

.chatbot-form button:hover {
    background: var(--primary-dark);
}