/* ============================================================
   CHATBOT STYLES — TravMories Branding
   Primary:  #008cd2  |  Accent: #afca05  |  Light: #47acdf
   Dark:     #043184  |  Font:   "Tahoma"
   ============================================================ */

/* --- Brand Tokens (local aliases) --- */
.chatbot-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: "Tahoma", "Segoe UI", system-ui, sans-serif;
}

/* --- FAB Button --- */
.chatbot-fab {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #47acdf 0%, #008cd2 60%, #043184 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 20px rgba(0, 140, 210, 0.45);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    position: relative;
    z-index: 1;
}
.chatbot-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 26px rgba(0, 140, 210, 0.6);
}

/* --- Chat Window --- */
.chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(4, 49, 132, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 80vh;
}

/* Transition classes */
.chatbot-enter {
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}
.chatbot-enter-start {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
}
.chatbot-enter-end {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.chatbot-leave {
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}
.chatbot-leave-start {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.chatbot-leave-end {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
}

/* --- Header --- */
.chatbot-header {
    background: linear-gradient(
        135deg,
        #008cd2 0%,
        #008cd2 65%,
        #afca05 65%,
        #afca05 100%
    );
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    flex-shrink: 0;
}
.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chatbot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
    padding: 3px;
}
.chatbot-header-name {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.chatbot-header-status {
    font-size: 11px;
    opacity: 0.92;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}
.chatbot-status-dot {
    width: 7px;
    height: 7px;
    background: #afca05;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}
.chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.chatbot-close-btn,
.chatbot-restart-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    padding: 5px 7px;
    border-radius: 8px;
    line-height: 1;
    transition: background 0.15s;
}
.chatbot-close-btn:hover,
.chatbot-restart-btn:hover {
    background: rgba(255, 255, 255, 0.32);
}

/* --- Messages Area --- */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
    background: #f7fbff;
}
.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}
.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: #47acdf;
    border-radius: 4px;
    opacity: 0.5;
}

/* Message Rows */
.chatbot-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: fadeInUp 0.25s ease;
}
.chatbot-msg-row.user {
    flex-direction: row-reverse;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-bot-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #daeef9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    overflow: hidden;
    padding: 2px;
}

.chatbot-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Bubbles */
.chatbot-bubble {
    max-width: 78%;
    padding: 9px 13px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.55;
    word-wrap: break-word;
}
.chatbot-bubble-bot {
    background: #fff;
    color: #303030;
    border: 1px solid #daeef9;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 140, 210, 0.08);
}
.chatbot-bubble-user {
    background: linear-gradient(135deg, #47acdf 0%, #008cd2 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chatbot-bubble p {
    margin: 0 0 4px;
}
.chatbot-bubble p:last-child {
    margin-bottom: 0;
}

/* Typing Indicator */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
}
.chatbot-typing span {
    width: 7px;
    height: 7px;
    background: #47acdf;
    border-radius: 50%;
    display: inline-block;
    animation: typing-bounce 1.2s infinite ease-in-out;
}
.chatbot-typing span:nth-child(1) {
    animation-delay: 0s;
}
.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}
.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes typing-bounce {
    0%,
    60%,
    100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-6px);
    }
}

/* --- Options Bar --- */
.chatbot-options {
    padding: 8px 12px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    border-top: 2px solid #f0f9ff;
    flex-shrink: 0;
    background: #fff;
}
.chatbot-option-btn {
    background: #fff;
    border: 1.5px solid #008cd2;
    color: #008cd2;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: "Tahoma", sans-serif;
    cursor: pointer;
    transition:
        background 0.15s,
        color 0.15s,
        transform 0.1s,
        border-color 0.15s;
    line-height: 1.4;
}
.chatbot-option-btn:hover {
    background: #008cd2;
    color: #fff;
    transform: translateY(-1px);
    border-color: #008cd2;
}

/* --- Trip Cards --- */
.chatbot-trips-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.chatbot-trip-card {
    background: #fff;
    border: 1px solid #daeef9;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 140, 210, 0.08);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.chatbot-trip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 140, 210, 0.16);
}
.chatbot-trip-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}
.chatbot-trip-img-placeholder {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #e8f6fd, #c7e9f8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #008cd2;
    font-size: 28px;
}
.chatbot-trip-body {
    padding: 11px 13px 13px;
}
.chatbot-trip-name {
    font-weight: 700;
    font-size: 14px;
    color: #043184;
    margin-bottom: 5px;
    line-height: 1.3;
}
.chatbot-trip-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 5px;
    flex-wrap: wrap;
}
.chatbot-trip-meta i {
    color: #008cd2;
}
.chatbot-trip-tagline {
    font-size: 12px;
    color: #525252;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.chatbot-trip-price {
    font-size: 12px;
    color: #444444;
    margin-bottom: 8px;
}
.chatbot-trip-price strong {
    color: #008cd2;
}
.chatbot-trip-cta {
    display: inline-block;
    background: linear-gradient(135deg, #47acdf 0%, #008cd2 100%);
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none !important;
    transition:
        opacity 0.15s,
        transform 0.1s;
    font-family: "Tahoma", sans-serif;
}
.chatbot-trip-cta:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}
.chatbot-trip-cta i {
    font-size: 11px;
    margin-left: 4px;
}

/* --- Lead Prompt --- */
.chatbot-lead-prompt {
    background: linear-gradient(135deg, #e8f6fd 0%, #c7e9f8 100%);
    border: 1px solid #b0daf3;
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}
.chatbot-lead-prompt p {
    margin: 0 0 10px;
    font-size: 13px;
    color: #043184;
}

/* --- No Match --- */
.chatbot-no-match {
    background: #f2fbff;
    border: 1px solid #daeef9;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    color: #525252;
}
.chatbot-no-match i {
    color: #008cd2;
    display: block;
    margin-bottom: 10px;
}
.chatbot-no-match p {
    font-size: 13px;
    margin-bottom: 12px;
}

/* --- Lead Form --- */
.chatbot-lead-form {
    background: #f2fbff;
    border: 1px solid #daeef9;
    border-radius: 14px;
    padding: 14px;
}
.chatbot-lead-form-title {
    font-weight: 700;
    font-size: 14px;
    color: #043184;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chatbot-lead-form-title i {
    color: #008cd2;
}
.chatbot-form-group {
    margin-bottom: 9px;
}
.chatbot-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #b0daf3;
    border-radius: 10px;
    font-size: 13px;
    font-family: "Tahoma", sans-serif;
    outline: none;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
    box-sizing: border-box;
    color: #303030;
    background: #fff;
}
.chatbot-input:focus {
    border-color: #008cd2;
    box-shadow: 0 0 0 3px rgba(0, 140, 210, 0.12);
}
.chatbot-input-error {
    border-color: #dc3545 !important;
}
.chatbot-error {
    font-size: 11px;
    color: #dc3545;
    margin-top: 3px;
    display: block;
}
.chatbot-privacy-note {
    font-size: 11px;
    color: #9a9a9a;
    text-align: center;
    margin: 8px 0 0;
}
.chatbot-privacy-note i {
    margin-right: 3px;
    color: #afca05;
}

/* --- Buttons --- */
.chatbot-btn-primary {
    background: linear-gradient(135deg, #47acdf 0%, #008cd2 100%);
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 700;
    font-family: "Tahoma", sans-serif;
    cursor: pointer;
    transition:
        opacity 0.15s,
        transform 0.1s,
        box-shadow 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(0, 140, 210, 0.35);
}
.chatbot-btn-primary:hover:not(:disabled) {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 140, 210, 0.45);
}
.chatbot-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.chatbot-btn-full {
    width: 100%;
    justify-content: center;
}

.chatbot-btn-secondary {
    background: #f2fbff;
    color: #008cd2;
    border: 1.5px solid #008cd2;
    border-radius: 22px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: "Tahoma", sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition:
        background 0.15s,
        color 0.15s;
}
.chatbot-btn-secondary:hover {
    background: #008cd2;
    color: #fff;
}

/* --- Success --- */
.chatbot-success {
    background: linear-gradient(135deg, #f4fdff 0%, #e8f6fd 100%);
    border: 1px solid #b0daf3;
    border-radius: 14px;
    padding: 22px 16px;
    text-align: center;
}
.chatbot-success i {
    color: #afca05;
    display: block;
    margin-bottom: 10px;
}
.chatbot-success h4 {
    font-size: 16px;
    font-weight: 700;
    color: #043184;
    margin: 0 0 6px;
}
.chatbot-success p {
    font-size: 13px;
    color: #444444;
    margin: 0 0 14px;
}

/* --- Mobile Responsive --- */
@media (max-width: 420px) {
    .chatbot-wrapper {
        bottom: 16px;
        right: 12px;
    }
    .chatbot-window {
        width: calc(100vw - 24px);
        right: 0;
        bottom: 66px;
        max-height: 85vh;
    }
}
