/* =================================================================
   GARDA CONCIERGE AI — Full-page Guide + Map v1.0
   Split layout: sidebar + chat + interactive Leaflet map
   ================================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.gc-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0F0F1A;
    color: #1C1C2E;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

/* ── App Layout ─────────────────────────────────────────────── */
.gc-app {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.gc-sidebar {
    width: 56px;
    background: #1C1C2E;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 8px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.gc-sidebar__logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 8px;
}
.gc-sidebar__logo:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.gc-sidebar__btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.gc-sidebar__btn:hover {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
}
.gc-sidebar__spacer { flex: 1; }
.gc-sidebar__brand {
    padding: 8px 0;
    opacity: 0.7;
}

/* ── AI Orb (same as widget) ──────────────────────────────── */
.ig-ai-orb {
    display: inline-block;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    position: relative;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4, #3b82f6, #a855f7, #6366f1);
    background-size: 300% 300%;
    animation: ig-orb-gradient 3s ease infinite;
}
.ig-ai-orb::after {
    content: '';
    position: absolute;
    inset: 25%;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    filter: blur(3px);
    animation: ig-orb-shine 3s ease infinite;
}
.ig-ai-orb--xs { width: 20px; height: 20px; }
.ig-ai-orb--xs::after { inset: 20%; }
@keyframes ig-orb-gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes ig-orb-shine {
    0%, 100% { opacity: 0.5; transform: translate(-10%,-10%) scale(1); }
    50%      { opacity: 0.7; transform: translate(-5%,-5%) scale(1.1); }
}

/* ── Chat Panel ─────────────────────────────────────────────── */
.gc-chat {
    flex: 1;
    min-width: 380px;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    position: relative;
}
.gc-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #F3F4F6;
    flex-shrink: 0;
    background: #fff;
}
.gc-chat__header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gc-chat__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1C1C2E;
    margin: 0;
}
.gc-chat__status {
    font-size: 0.7rem;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}
.gc-chat__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px rgba(52,211,153,0.5);
    display: inline-block;
}
.gc-chat__toggle-map {
    display: none; /* shown on mobile */
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 100px;
    border: 1px solid #E5E7EB;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4B5563;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.gc-chat__toggle-map:hover {
    background: #F3F4F6;
}

/* ── Messages ───────────────────────────────────────────────── */
.gc-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}
.gc-chat__messages::-webkit-scrollbar { width: 4px; }
.gc-chat__messages::-webkit-scrollbar-track { background: transparent; }
.gc-chat__messages::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 4px; }

/* Welcome screen */
.gc-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px 20px;
    gap: 16px;
}
.gc-welcome__orb { filter: drop-shadow(0 8px 24px rgba(99,102,241,0.3)); }
.gc-welcome__title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1C1C2E;
    line-height: 1.3;
}
.gc-welcome__title strong { color: #6366f1; }
.gc-welcome__desc {
    font-size: 0.88rem;
    color: #6B7280;
    line-height: 1.6;
    max-width: 360px;
}

/* Message bubbles */
.gc-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 100%;
    animation: gc-fade-in 0.3s ease both;
}
@keyframes gc-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.gc-msg--user {
    flex-direction: row-reverse;
    padding-left: 40px;
}
.gc-msg--bot {
    padding-right: 20px;
}
.gc-msg__avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}
.gc-msg__content {
    flex: 1;
    min-width: 0;
}
.gc-msg__bubble {
    font-size: 0.88rem;
    line-height: 1.7;
    word-break: break-word;
}
.gc-msg--user .gc-msg__bubble {
    background: #1C1C2E;
    color: #fff;
    padding: 12px 16px;
    border-radius: 18px 18px 6px 18px;
    display: inline-block;
}
.gc-msg--bot .gc-msg__bubble {
    color: #1C1C2E;
}
.gc-msg--bot .gc-msg__bubble h3,
.gc-msg--bot .gc-msg__bubble strong {
    font-weight: 700;
    color: #111827;
}
.gc-msg--bot .gc-msg__bubble a {
    color: #d97706;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    font-weight: 500;
}
.gc-msg--bot .gc-msg__bubble a:hover { color: #b45309; }

/* Location pin inline */
.gc-loc-pin {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    color: #6366f1;
    cursor: pointer;
    transition: color 0.2s;
}
.gc-loc-pin:hover { color: #4f46e5; }
.gc-loc-pin::before {
    content: '\uD83D\uDCCD';
    font-size: 0.85em;
}

/* Streaming cursor */
.gc-msg__bubble--streaming::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #6366f1;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: gc-blink 0.8s ease infinite;
}
@keyframes gc-blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* Typing indicator */
.gc-typing { display: flex; gap: 5px; padding: 4px 2px; align-items: center; }
.gc-typing span {
    width: 7px; height: 7px; border-radius: 50%; background: #9CA3AF;
    animation: gc-typing-pulse 1.4s ease-in-out infinite;
}
.gc-typing span:nth-child(2) { animation-delay: 0.15s; }
.gc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes gc-typing-pulse {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Feedback thumbs */
.gc-feedback {
    display: flex;
    gap: 2px;
    padding: 6px 0 0;
    opacity: 0;
    animation: gc-fade-in 0.3s ease 0.4s both;
}
.gc-feedback__btn {
    width: 28px; height: 28px; border-radius: 6px;
    border: none; background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #D1D5DB; transition: all 0.2s; padding: 0;
}
.gc-feedback__btn:hover { color: #6B7280; background: #F3F4F6; }
.gc-feedback__btn--up.gc-feedback__btn--active { color: #10B981; background: #ECFDF5; }
.gc-feedback__btn--down.gc-feedback__btn--active { color: #EF4444; background: #FEF2F2; }
.gc-feedback__btn:disabled { cursor: default; opacity: 0.5; }
.gc-feedback__btn--active:disabled { opacity: 1; }

/* Follow-up chips */
.gc-followups {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0 0;
    animation: gc-fade-in 0.3s ease both;
}

/* ── Suggestion Chips ───────────────────────────────────────── */
.gc-chat__suggestions {
    padding: 0 20px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}
.gc-chip {
    padding: 9px 16px;
    border-radius: 100px;
    border: 1px solid #E5E7EB;
    background: #fff;
    font-size: 0.8rem;
    color: #4B5563;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}
.gc-chip:hover {
    background: #F5F3FF;
    border-color: #A78BFA;
    color: #6D28D9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139,92,246,0.12);
}

/* ── Input Area ─────────────────────────────────────────────── */
.gc-chat__input {
    padding: 12px 20px 16px;
    border-top: 1px solid #F3F4F6;
    flex-shrink: 0;
    background: #fff;
}
.gc-chat__input-wrap {
    display: flex;
    align-items: center;
    background: #F5F6FA;
    border: 1.5px solid #E5E7EB;
    border-radius: 100px;
    padding: 4px 4px 4px 18px;
    transition: all 0.2s;
    gap: 2px;
}
.gc-chat__input-wrap:focus-within {
    border-color: #A78BFA;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(167,139,250,0.12);
}
.gc-chat__input input {
    flex: 1;
    padding: 10px 4px;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    color: #1C1C2E;
    outline: none;
    background: transparent;
    min-width: 0;
}
.gc-chat__input input::placeholder { color: #9CA3AF; }
.gc-chat__input-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.gc-chat__powered {
    display: block;
    text-align: center;
    font-size: 0.65rem;
    color: #D1D5DB;
    margin-top: 8px;
    letter-spacing: 0.02em;
}

/* Mic button */
.gc-mic-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: transparent; border: none; cursor: pointer;
    color: #9CA3AF; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0; transition: all 0.2s;
    padding: 0; position: relative;
}
.gc-mic-btn:hover { background: rgba(167,139,250,0.1); color: #7C3AED; }
.gc-mic-btn__pulse { display: none; }
.gc-mic-btn--recording { background: rgba(239,68,68,0.1); color: #EF4444; }
.gc-mic-btn--recording .gc-mic-btn__pulse {
    display: block; position: absolute; inset: -3px; border-radius: 50%;
    border: 2px solid #EF4444; animation: gc-mic-pulse 1.2s ease-out infinite;
}
@keyframes gc-mic-pulse { 0% { opacity:0.8; transform:scale(1); } 100% { opacity:0; transform:scale(1.5); } }

/* Send button */
.gc-send-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none; cursor: pointer; color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3); padding: 0;
}
.gc-send-btn:hover { transform: scale(1.06); box-shadow: 0 4px 14px rgba(99,102,241,0.4); }

/* ── Map Panel ──────────────────────────────────────────────── */
.gc-map {
    flex: 1;
    position: relative;
    min-width: 0;
    transition: flex 0.4s cubic-bezier(0.16,1,0.3,1);
}
.gc-map--collapsed {
    flex: 0;
    min-width: 0;
    overflow: hidden;
}
.gc-map__container {
    width: 100%;
    height: 100%;
}
.gc-map__collapse {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1000;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #E5E7EB;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4B5563;
    transition: all 0.2s;
}
.gc-map__collapse:hover {
    background: #F3F4F6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.gc-map--collapsed .gc-map__collapse svg {
    transform: rotate(180deg);
}

/* Leaflet marker customizations */
.gc-marker {
    background: none;
    border: none;
}
.gc-marker__pin {
    width: 32px;
    height: 42px;
    position: relative;
}
.gc-marker__dot {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(99,102,241,0.4);
}
.gc-marker__dot span {
    transform: rotate(45deg);
    font-size: 14px;
    line-height: 1;
}
.gc-marker__label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: #1C1C2E;
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-family: 'Inter', sans-serif;
}

/* Timeline (day planner) */
.gc-timeline { padding: 12px 0 4px; }
.gc-tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 6px; }
.gc-tl-item__line {
    display: flex; flex-direction: column; align-items: center;
    flex-shrink: 0; width: 32px; position: relative;
}
.gc-tl-item__line::after {
    content: ''; position: absolute; top: 32px; bottom: -6px;
    left: 50%; width: 2px; margin-left: -1px;
    background: linear-gradient(180deg, #E5E7EB, #D1D5DB);
}
.gc-tl-item--last .gc-tl-item__line::after { display: none; }
.gc-tl-item__dot {
    width: 32px; height: 32px; border-radius: 10px;
    background: #F5F3FF; border: 1.5px solid #DDD6FE;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; line-height: 1; flex-shrink: 0;
    position: relative; z-index: 1;
}
.gc-tl-item__content {
    flex: 1; min-width: 0; padding: 4px 0 10px;
    display: flex; flex-direction: column; gap: 2px;
}
.gc-tl-item__time { font-size: 0.7rem; font-weight: 700; color: #7C3AED; letter-spacing: 0.02em; }
.gc-tl-item__title { font-size: 0.85rem; font-weight: 600; color: #1C1C2E; line-height: 1.3; text-decoration: none; }
a.gc-tl-item__title { color: #d97706; text-decoration: underline; text-underline-offset: 2px; }
a.gc-tl-item__title:hover { color: #b45309; }
.gc-tl-item__desc { font-size: 0.75rem; color: #6B7280; line-height: 1.4; }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .gc-sidebar { display: none; }
    .gc-app { flex-direction: column; }
    .gc-chat {
        min-width: 100%;
        max-width: 100%;
        height: 100vh;
    }
    .gc-chat__toggle-map { display: inline-flex; }
    .gc-map {
        position: fixed;
        inset: 0;
        z-index: 9999;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
    }
    .gc-map--visible {
        transform: translateY(0);
    }
    .gc-map__collapse {
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        padding: 10px 20px;
        border-radius: 100px;
        font-family: 'Inter', sans-serif;
        font-size: 0.82rem;
        font-weight: 600;
        gap: 6px;
    }
}
