/* =========================================================
   ASSISTANT — FLOATING CHATBOT
========================================================= */

.tom-assistant {
    position: fixed;

    right: 24px;
    bottom: 24px;

    width: 420px;
    max-width: calc(100vw - 32px);

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 18px;

    overflow: hidden;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25);

    font-family: inherit;

    z-index: 999999;

    display: none;
}

.tom-assistant {
    width: 420px !important;
    max-width: calc(100vw - 32px) !important;
    box-sizing: border-box !important;
}


/* =========================================================
   OPEN STATE
========================================================= */

.tom-assistant.tom-assistant-open {
    display: block;
}


/* =========================================================
   HEADER
========================================================= */

.tom-assistant-header {
    display: flex;

    align-items: center;

    width: 100%;
    box-sizing: border-box;

    padding: 16px 20px;

    background: #007799;

    color: #ffffff;

    font-size: 18px;

    line-height: 1.3;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.tom-assistant-header .tom-assistant-close {
    margin-left: auto;

    flex-shrink: 0;
}

.tom-assistant-close {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;

    padding: 0;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: #ffffff;

    font-family: inherit;

    font-size: 28px;
    font-weight: 400;

    line-height: 1;

    text-align: center;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    box-shadow: none;
}

.tom-assistant-close:hover {
    background: rgba(255, 255, 255, 0.12);

    color: #ffffff;
}

.tom-assistant-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.7);

    outline-offset: 2px;
}


/* =========================================================
   MESSAGES
========================================================= */

.tom-assistant-messages {
    padding: 20px;

    min-height: 120px;

    max-height: 50vh;

    overflow-y: auto;

    background: #f8fafc;

    box-sizing: border-box;
}


.tom-assistant-message {
    display: flex;

    margin: 0 0 14px 0;

    min-width: 0;
}


.tom-assistant-message-bot {
    justify-content: flex-start;
}


.tom-assistant-message-text {
    max-width: 85%;

    min-width: 0;

    padding: 11px 14px;

    background: #ffffff;

    border-radius: 14px;


    color: #1f2937;

    font-size: 15px;

    line-height: 1.45;

    overflow-wrap: break-word;
}


/* =========================================================
   OPTIONS AREA
========================================================= */

.tom-assistant-options {
    display: flex;

    flex-direction: column;

    gap: 8px;

    padding: 12px 20px 20px;

    background: #ffffff;

    box-sizing: border-box;
}


/* =========================================================
   NORMAL OPTIONS
========================================================= */

.tom-assistant-option {
    display: block;

    width: 100%;

    margin: 0;

    padding: 11px 14px;

    box-sizing: border-box;

    border: 1px solid #dbe3e8;

    border-radius: 10px;

    background: #ffffff;

    color: #1f2937;

    font-family: inherit;

    font-size: 15px;
    font-weight: 400;

    line-height: 1.35;

    text-align: left;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    box-shadow: none;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}


.tom-assistant-option:hover {
    border-color: #007799;

    background: #f0f9fb;

    color: #1f2937;
}


/* =========================================================
   MAIN OPTIONS
   Find a car / FAQ / Help me choose
========================================================= */

.tom-assistant > .tom-assistant-options {
    border-top: 1px solid #e5e7eb;

    padding-top: 16px;
}


/* =========================================================
   FAQ TOPICS
========================================================= */

.tom-assistant-messages .tom-assistant-options {
    padding: 8px 0 0 !important;

    background: transparent !important;

    gap: 6px !important;
}


.tom-assistant-messages .tom-assistant-option {
    background: #e7f5f7 !important;

    border: 1px solid #b7dfe5 !important;

    color: #006b80 !important;

    font-weight: 600 !important;

    padding: 13px 15px !important;

    border-radius: 9px !important;
}


.tom-assistant-messages .tom-assistant-option:hover {
    background: #d6eef2 !important;

    border-color: #007799 !important;

    color: #006b80 !important;
}


/* =========================================================
   FIND A CAR
========================================================= */

.tom-assistant-option[data-assistant-action="find-car"] {
    border-color: #007799;

    background: #007799;

    color: #ffffff;

    font-weight: 600;

    text-align: center;
}


.tom-assistant-option[data-assistant-action="find-car"]:hover {
    background: #00657f;

    border-color: #00657f;

    color: #ffffff;
}


/* =========================================================
   FLOATING BUTTON
========================================================= */

.tom-assistant-floating-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    min-width: 132px;
    height: 52px;
    margin: 0;
    padding: 0 18px;
    box-sizing: border-box;
    border: 0;
    border-radius: 26px;
    background: #007799;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    z-index: 999998;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.22);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    transition:
        transform 0.18s ease,
        background 0.18s ease;
}

.tom-assistant-floating-button i {
    font-size: 16px;
    line-height: 1;
}


.tom-assistant-floating-button:hover {
    background: #00657f;

    color: #ffffff;

    transform: translateY(-2px);
}


.tom-assistant-floating-button:focus {
    outline: 2px solid #007799;

    outline-offset: 3px;
}


/* =========================================================
   FLOATING BUTTON — HIDDEN WHEN ASSISTANT OPEN
========================================================= */

.tom-assistant-floating-button.tom-assistant-floating-hidden {
    display: none;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .tom-assistant {
        right: 12px;
        bottom: 12px;

        width: calc(100vw - 24px);

        max-width: none;

        border-radius: 14px;
    }


    .tom-assistant-header {
        padding: 14px 16px;

        font-size: 17px;
    }


    .tom-assistant-close {
        width: 34px;
        height: 34px;

        font-size: 27px;
    }


    .tom-assistant-messages {
        padding: 16px;

        max-height: 45vh;
    }


    .tom-assistant-options {
        padding: 10px 16px 16px;

        gap: 8px;
    }


    .tom-assistant-option {
        padding: 11px 13px;
    }


    .tom-assistant-floating-button {
    right: 16px;
    bottom: 16px;
    min-width: 118px;
    width: auto;
    height: 48px;
    padding: 0 16px;
    border-radius: 24px;
    font-size: 14px;
}

.tom-assistant-floating-button i {
    font-size: 15px;
}

}

.flatpickr-calendar {
    z-index: 2147483647 !important;
}


/* =========================================================
   START OVER
========================================================= */

.tom-assistant-start-over {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 8px;
    border: 1px solid #d7dde0;
    border-radius: 8px;
    background: transparent;
    color: #68757d;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.tom-assistant-start-over:hover {
    background: #f5f7f8;
    color: #263238;
}

.tom-assistant-faq-category {
    display: flex;
    align-items: center;
    gap: 9px;
}

.tom-assistant-faq-category i {
    width: 18px;
    flex: 0 0 18px;
    text-align: center;
}

.tom-assistant-faq-category span {
    flex: 1;
    text-align: left;
}

.tom-assistant-faq-cta-text {
    margin-top: 16px;
    margin-bottom: 8px;
    padding-top: 14px;
    border-top: 1px solid #e4e8ea;

    font-size: 13px;
    line-height: 1.45;
    color: #5f6b73;
}

.tom-assistant-faq-cta {
    font-weight: 700;
}

/* =========================================================
   ASSISTANT TEXT MESSAGES
   Non-clickable content must not look like a button
========================================================= */

.tom-assistant-message-bot {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.tom-assistant-message-bot .tom-assistant-message-text {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

/* =========================================================
   TIME SLOTS — COMPACT CLICKABLE CHIPS
========================================================= */

.tom-assistant-time-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

.tom-assistant-time-option {
    width: auto;
    min-width: 0;
    min-height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 7px 11px;

    background: #e7f5f7;
    border: 1px solid #9fd5de;
    border-radius: 8px;

    color: #006b80;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;

    text-align: center;
    white-space: nowrap;

    cursor: pointer;
}

.tom-assistant-time-option:hover {
    background: #d4eef2;
    border-color: #007799;
    color: #005f73;
}

.tom-assistant-time-option:active {
    background: #c5e7ec;
    transform: translateY(1px);
}

/* =========================================================
   DATE PICKER — PICKUP / DROPOFF
========================================================= */

.tom-assistant-messages .tom-assistant-date .tom-assistant-date-input {
    display: block;

    width: 100%;
    height: 46px;

    box-sizing: border-box;

    margin: 8px 0 4px;
    padding: 0 14px;

    background: #e7f5f7;

    border: 1px solid #9fd5de;
    border-radius: 9px;

    color: #006b80;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: none;

    appearance: none;
    -webkit-appearance: none;
}


.tom-assistant-messages .tom-assistant-date .tom-assistant-date-input:hover {
    background: #d8eef2;
    border-color: #007799;
}


.tom-assistant-messages .tom-assistant-date .tom-assistant-date-input:focus {
    outline: none;

    background: #ffffff;
    border-color: #007799;

    box-shadow:
        0 0 0 3px rgba(0, 119, 153, 0.12);
}


.tom-assistant-messages .tom-assistant-date .tom-assistant-date-input {
    color: #006b80;
    opacity: 1;
}