/* This gives the landing entry and persistent assistant one calm BookMOTGarage identity. */
.landing-ai-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #c9d7df;
    border-radius: 8px;
    background: #fff;
}

.landing-ai-entry textarea {
    min-height: 48px;
    padding: 4px 6px;
    border: 0;
    outline: 0;
    resize: none;
    color: #09214a;
    background: transparent;
    line-height: 1.45;
}

.landing-ai-entry-actions {
    display: flex;
    gap: 6px;
}

.landing-ai-entry-actions button,
.landing-ai-reply button,
.landing-ai-panel-header button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #006b73;
}

.landing-ai-entry-actions button:first-child {
    color: #075b68;
    background: #edf5f7;
}

.landing-search-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: #66758b;
    font-size: 12px;
}

.landing-search-divider::before,
.landing-search-divider::after {
    flex: 1;
    height: 1px;
    content: "";
    background: #dce4e9;
}

/* This compact workspace follows customers across public pages without covering the main journey. */
.landing-ai-panel {
    position: fixed;
    z-index: 1055;
    top: 82px;
    right: 18px;
    bottom: 18px;
    display: grid;
    width: min(360px, calc(100vw - 36px));
    grid-template-rows: auto auto minmax(120px, 1fr) auto auto auto auto;
    overflow: hidden;
    border: 1px solid #b7cad2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 58px rgba(7, 31, 55, .24);
    transform: translateX(calc(100% + 44px));
    visibility: hidden;
    transition: transform .24s ease, visibility .24s;
}

.landing-ai-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.landing-ai-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    color: #fff;
    background: #07264b;
}

.landing-ai-panel-identity {
    display: flex;
    align-items: center;
    gap: 9px;
}

.landing-ai-panel-identity > img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
}

.landing-ai-panel-header span,
.landing-ai-panel-header small {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.landing-ai-panel-header h2 {
    margin: 2px 0 0;
    color: #fff;
    font-size: 17px;
    letter-spacing: 0;
}

.landing-ai-panel-header small {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .16);
}

.landing-ai-panel-header button {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, .14);
}

/* This status area reports genuine request lifecycle states without pretending to expose reasoning. */
.landing-ai-activity {
    padding: 9px 16px;
    border-bottom: 1px solid #dfe8ec;
    color: #385267;
    background: #f7fafb;
    font-size: 12px;
}

.landing-ai-activity-heading {
    display: flex;
    gap: 8px;
    align-items: center;
}

.landing-ai-activity-heading strong {
    min-width: 0;
    flex: 1;
}

.landing-ai-activity-heading button {
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid #8eb5bf;
    border-radius: 5px;
    color: #075b68;
    background: #fff;
    font-weight: 600;
}

.landing-ai-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #23a36d;
    box-shadow: 0 0 0 4px rgba(35, 163, 109, .12);
}

.landing-ai-progress {
    height: 3px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 3px;
    background: #dce8eb;
    opacity: 0;
}

.landing-ai-progress span {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: #07828a;
}

.landing-ai-activity.is-busy .landing-ai-progress {
    opacity: 1;
}

.landing-ai-activity.is-busy .landing-ai-progress span {
    animation: landing-ai-progress 1.25s ease-in-out infinite;
}

.landing-ai-activity-steps {
    display: flex;
    gap: 14px;
    margin: 7px 0 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
    color: #617486;
    white-space: nowrap;
}

.landing-ai-panel [hidden] {
    display: none !important;
}

.landing-ai-activity-steps li::before {
    margin-right: 5px;
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9dafb8;
}

.landing-ai-activity-steps .is-complete::before {
    background: #27a26d;
}

.landing-ai-activity-steps .is-active::before {
    background: #07828a;
    animation: landing-ai-pulse 1s ease-in-out infinite;
}

.landing-ai-messages {
    overflow-y: auto;
    padding: 16px 16px 8px;
    background: #f7fafb;
}

.landing-ai-message-row {
    display: flex;
    gap: 7px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.landing-ai-message-row.is-customer {
    justify-content: flex-end;
}

.landing-ai-message-avatar {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: contain;
    background: #e8f5f3;
}

.landing-ai-message {
    width: fit-content;
    max-width: 88%;
    margin-bottom: 0;
    padding: 10px 12px;
    border: 1px solid #dbe5ea;
    border-radius: 8px;
    color: #14233e;
    background: #fff;
    line-height: 1.45;
}

.landing-ai-message-row.is-customer .landing-ai-message {
    border-color: #08767c;
    color: #fff;
    background: #08767c;
}

.landing-ai-facts {
    margin: 0 16px 8px;
    padding: 9px 11px;
    border: 1px solid #b9e2ce;
    border-radius: 6px;
    color: #12633c;
    background: #effaf4;
}

.landing-ai-facts span {
    display: block;
    margin: 3px 0;
    font-size: 12px;
}

.landing-ai-choices {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 0 16px 8px;
}

.landing-ai-choices button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 8px 11px;
    border: 1px solid #98bbc4;
    border-radius: 6px;
    color: #075b68;
    background: #fff;
    font-weight: 600;
}

.landing-ai-busy:empty {
    display: none;
}

.landing-ai-continue {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    margin: 0 16px 10px;
    padding: 11px 13px;
    border: 1px solid #0b7580;
    border-radius: 6px;
    color: #074f59;
    background: #f1fbfb;
}

.landing-ai-continue:hover {
    color: #063f47;
}

.landing-ai-continue small {
    display: block;
    color: #657489;
}

.landing-ai-reply {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    padding: 10px 16px;
    border-top: 1px solid #dbe5ea;
}

.landing-ai-reply input {
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid #c4d2d9;
    border-radius: 6px;
}

/* This animated portrait communicates turn state while retaining the original Booking Agent artwork. */
.landing-ai-agent {
    position: relative;
    display: grid;
    min-height: 92px;
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: center;
    padding: 10px 12px 10px 16px;
    border-top: 1px solid #e0e8ec;
    background: #f8fbfc;
}

.landing-ai-agent-copy strong,
.landing-ai-agent-copy span {
    display: block;
}

.landing-ai-agent-copy strong {
    color: #0b3450;
    font-size: 12px;
}

.landing-ai-agent-copy span {
    margin-top: 3px;
    color: #657489;
    font-size: 11px;
}

.landing-ai-agent-portrait {
    position: relative;
    width: 88px;
    height: 82px;
}

.landing-ai-agent-portrait img {
    position: relative;
    z-index: 2;
    width: 88px;
    height: 88px;
    object-fit: contain;
    animation: landing-ai-breathe 3.4s ease-in-out infinite;
}

.landing-ai-agent-ring {
    position: absolute;
    z-index: 1;
    inset: 10px 5px 4px;
    border: 2px solid rgba(8, 130, 138, .24);
    border-radius: 50%;
}

.landing-ai-agent-signal {
    position: absolute;
    z-index: 3;
    top: 3px;
    right: 1px;
    display: flex;
    gap: 2px;
    align-items: end;
    height: 15px;
}

.landing-ai-agent-signal i {
    width: 3px;
    height: 5px;
    border-radius: 2px;
    background: #07828a;
}

.landing-ai-panel[data-agent-state="thinking"] .landing-ai-agent-ring {
    border-top-color: #f5a623;
    animation: landing-ai-spin 1s linear infinite;
}

.landing-ai-panel[data-agent-state="listening"] .landing-ai-agent-ring {
    animation: landing-ai-ring 1.15s ease-out infinite;
}

.landing-ai-panel[data-agent-state="speaking"] .landing-ai-agent-signal i {
    animation: landing-ai-signal .65s ease-in-out infinite alternate;
}

.landing-ai-panel[data-agent-state="speaking"] .landing-ai-agent-signal i:nth-child(2) {
    animation-delay: .16s;
}

.landing-ai-panel[data-agent-state="speaking"] .landing-ai-agent-signal i:nth-child(3) {
    animation-delay: .3s;
}

.landing-ai-launcher,
.ai-persistent-agent {
    position: fixed;
    z-index: 1045;
    right: 20px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    color: #fff;
    background: transparent;
}

.landing-ai-launcher > span:first-child,
.ai-persistent-agent > span:first-child {
    padding: 9px 12px;
    border-radius: 6px;
    text-align: left;
    background: #073d4a;
    box-shadow: 0 8px 22px rgba(4, 47, 57, .2);
    font-size: 12px;
}

.landing-ai-launcher strong,
.landing-ai-launcher small {
    display: block;
}

.landing-ai-launcher small {
    margin-top: 2px;
    color: #d7edf0;
    font-size: 10px;
}

.landing-ai-launcher-portrait {
    position: relative;
    display: block;
    width: 50px;
    height: 50px;
}

.landing-ai-launcher img,
.ai-persistent-agent img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 8px 8px rgba(8, 36, 50, .18));
    animation: landing-ai-breathe 3.4s ease-in-out infinite;
}

.landing-ai-launcher-status {
    position: absolute;
    z-index: 2;
    top: 2px;
    right: 1px;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #20a66a;
}

.landing-ai-launcher[data-agent-state="thinking"] .landing-ai-launcher-status {
    background: #f5a623;
    animation: landing-ai-pulse .85s ease-in-out infinite;
}

.landing-ai-launcher[data-agent-state="listening"] .landing-ai-launcher-status,
.landing-ai-launcher[data-agent-state="speaking"] .landing-ai-launcher-status {
    background: #0aa3b0;
    animation: landing-ai-pulse .7s ease-in-out infinite;
}

.landing-ai-panel.is-open + .landing-ai-launcher {
    visibility: hidden;
}

.ai-persistent-agent {
    cursor: pointer;
}

@keyframes landing-ai-spin {
    to { transform: rotate(360deg); }
}

@keyframes landing-ai-progress {
    from { transform: translateX(-110%); }
    to { transform: translateX(280%); }
}

@keyframes landing-ai-pulse {
    50% { opacity: .35; transform: scale(.75); }
}

@keyframes landing-ai-breathe {
    50% { transform: translateY(-3px); }
}

@keyframes landing-ai-ring {
    from { opacity: .8; transform: scale(.82); }
    to { opacity: 0; transform: scale(1.15); }
}

@keyframes landing-ai-signal {
    to { height: 14px; }
}

@media (max-width: 767px) {
    .landing-ai-panel {
        top: auto;
        right: 0;
        bottom: 0;
        width: 100%;
        height: min(86vh, 720px);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 8px 8px 0 0;
        transform: translateY(105%);
    }

    .landing-ai-panel.is-open {
        transform: translateY(0);
    }

    .landing-ai-activity-steps {
        gap: 10px;
        overflow-x: auto;
    }

    .landing-ai-launcher > span:first-child,
    .ai-persistent-agent > span:first-child {
        display: none;
    }

    .landing-ai-launcher-portrait,
    .landing-ai-launcher img,
    .ai-persistent-agent img {
        width: 52px;
        height: 52px;
    }

    .landing-ai-launcher,
    .ai-persistent-agent {
        right: 8px;
        bottom: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-ai-panel { transition: none; }
    .landing-ai-progress span,
    .landing-ai-agent-portrait img,
    .landing-ai-agent-ring,
    .landing-ai-agent-signal i,
    .landing-ai-launcher img,
    .landing-ai-launcher-status { animation: none !important; }
}
