/* Explain: Reusable component styles for buttons, cards, and badges. */
.qw-container {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* ---------- Buttons ---------- */
.qw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.qw-btn--primary {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 10px 24px rgba(6, 182, 212, 0.28);
}

.qw-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(6, 182, 212, 0.35);
}

.qw-btn--ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(6px);
}

.qw-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.26);
}

.qw-btn--outline {
    background: #fff;
    color: var(--primary-color);
    border-color: var(--border-color);
}

.qw-btn--outline:hover {
    border-color: var(--accent-color);
    color: var(--secondary-color);
}

.qw-btn--navy {
    background: var(--primary-color);
    color: #fff;
}

.qw-btn--navy:hover {
    background: var(--primary-hover);
}

.qw-btn--lg { padding: 0.9rem 1.6rem; font-size: 1rem; }
.qw-btn--sm { padding: 0.5rem 0.95rem; font-size: 0.85rem; }

/* ---------- Badges / chips / tags ---------- */
.qw-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.42);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.qw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.qw-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.qw-chip:hover {
    border-color: var(--accent-color);
    color: var(--secondary-color);
    background: #fff;
}

.qw-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #0e7490;
    font-size: 0.76rem;
    font-weight: 600;
}

/* ---------- Cards ---------- */
.qw-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qw-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
}

.qw-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.qw-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.qw-card:hover .qw-card__media img {
    transform: scale(1.06);
}

.qw-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}

.qw-card__title { font-size: 1.2rem; }

.qw-card__loc {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.qw-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.6rem;
}

/* ---------- Route cards ---------- */
.qw-route {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
}

.qw-route__no {
    flex: 0 0 auto;
    min-width: 3.2rem;
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.7rem;
    background: var(--primary-color);
    color: #fff;
    font-weight: 800;
    font-family: var(--font-heading);
}

.qw-route__path { font-weight: 700; color: var(--primary-color); }
.qw-route__meta { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.5rem; }
.qw-route__stops { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.4rem; line-height: 1.5; }

/* ---------- Feature cards ---------- */
.qw-feature {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    height: 100%;
    box-shadow: var(--shadow-soft);
}

.qw-feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: #fff;
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.qw-feature h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.qw-feature p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; }

/* ---------- AI assistant ---------- */
.assistant-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 60;
    width: 3.7rem;
    height: 3.7rem;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 14px 30px rgba(6, 182, 212, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.assistant-fab[hidden] { display: none; }
.assistant-fab:hover { transform: translateY(-2px) scale(1.04); }

.assistant-fab__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.65);
    animation: qw-pulse 2.4s ease-out infinite;
}

@keyframes qw-pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.55); opacity: 0; }
}

.assistant-panel {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 70;
    width: min(390px, calc(100vw - 2rem));
    max-height: min(640px, calc(100vh - 2.5rem));
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.assistant-panel[hidden] { display: none; }

.assistant-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: var(--primary-color);
    color: #fff;
}

.assistant-panel__title { display: flex; align-items: center; gap: 0.65rem; }

.assistant-panel__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.assistant-panel__title strong { display: block; font-size: 0.95rem; font-family: var(--font-heading); }

.assistant-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
}

.assistant-status::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--accent-color);
}

.assistant-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.05rem;
    padding: 0.3rem;
    border-radius: 0.5rem;
}

.assistant-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    background: var(--surface-color);
}

.assistant-panel__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.6rem 1rem 0; }
.assistant-panel__form { display: flex; gap: 0.5rem; padding: 0.75rem 1rem 0.5rem; }

.assistant-input {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    outline: none;
}

.assistant-send {
    flex: 0 0 auto;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: #fff;
}

.assistant-panel__note {
    padding: 0 1rem 0.9rem;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.assistant-panel__note[hidden] { display: none; }

.qw-msg {
    max-width: 86%;
    padding: 0.65rem 0.9rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: pre-line;
}

.qw-msg--bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 0.25rem;
}

.qw-msg--user {
    align-self: flex-end;
    background: var(--primary-color);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.qw-msg--typing { color: var(--text-muted); font-style: italic; }

/* ---------- Modals ---------- */
.qw-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.qw-modal[hidden] { display: none; }

.qw-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 37, 69, 0.62);
    backdrop-filter: blur(3px);
}

.qw-modal__dialog {
    position: relative;
    width: min(920px, 100%);
    max-height: min(90vh, 900px);
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    display: flex;
    flex-direction: column;
}

.qw-modal__dialog--sm { width: min(460px, 100%); }

.qw-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: none;
    background: rgba(11, 37, 69, 0.72);
    color: #fff;
}

.qw-modal__scroll { overflow-y: auto; }

/* ---------- Destination detail ---------- */
.dest-hero { position: relative; aspect-ratio: 16 / 9; max-height: 320px; overflow: hidden; }
.dest-hero img { width: 100%; height: 100%; object-fit: cover; }

.dest-hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 37, 69, 0.88), rgba(11, 37, 69, 0.05) 62%);
}

.dest-hero__title { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.15rem; color: #fff; }
.dest-hero__title h2 { color: #fff; font-size: clamp(1.5rem, 4vw, 2.1rem); }
.dest-hero__title span { color: rgba(255, 255, 255, 0.86); font-size: 0.88rem; }

.dest-body { padding: 1.5rem; display: grid; gap: 1.2rem; }
.dest-desc { color: var(--text-muted); line-height: 1.75; font-size: 1rem; }
.dest-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.dest-block {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
}

.dest-block h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.dest-block p { color: var(--text-muted); line-height: 1.65; font-size: 0.92rem; }

.dest-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.dest-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.75rem; }

.dest-map { width: 100%; height: 260px; border: 0; border-radius: var(--radius-md); }

.dest-viewer {
    position: relative;
    height: 320px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #0b2545;
}

.dest-viewer[hidden] { display: none; }
.dest-viewer canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.dest-viewer__hint {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    color: #fff;
    background: rgba(11, 37, 69, 0.66);
    padding: 0.5rem 0.8rem;
    border-radius: 0.75rem;
    font-size: 0.76rem;
    line-height: 1.45;
}

@media (min-width: 640px) {
    .dest-gallery { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Driver card ---------- */
.driver-card { padding: 1.75rem 1.5rem 1.5rem; text-align: center; }
.driver-card h2 { font-size: 1.55rem; margin-bottom: 0.3rem; }
.driver-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.9rem; }

.driver-address {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--surface-color);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    margin-bottom: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.driver-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }