/* GeoMonix AI intake chat widget — standalone styles, scoped under .gm-chat */

.gm-intake-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 12px;
    color: inherit;
    font: inherit;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.gm-intake-cta:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.6);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(59, 130, 246, 0.18));
}
.gm-intake-cta__icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.25);
}
.gm-intake-cta__text { flex: 1; line-height: 1.35; }
.gm-intake-cta__text strong { display: block; font-weight: 600; }
.gm-intake-cta__text span { display: block; font-size: 0.8rem; opacity: 0.75; }
.gm-intake-cta__arrow { flex: 0 0 auto; opacity: 0.6; }

/* Modal */
.gm-chat-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 20, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}
.gm-chat-backdrop.gm-open { display: flex; }

.gm-chat {
    width: min(560px, 100%);
    max-height: min(720px, 90vh);
    display: flex;
    flex-direction: column;
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    font-family: inherit;
}
.gm-chat__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.gm-chat__title { flex: 1; }
.gm-chat__title strong { display: block; font-size: 0.95rem; }
.gm-chat__title span { display: block; font-size: 0.75rem; opacity: 0.7; }
.gm-chat__close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}
.gm-chat__close:hover { background: rgba(148, 163, 184, 0.15); }

.gm-chat__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.gm-chat__msg {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    line-height: 1.45;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.gm-chat__msg--assistant {
    align-self: flex-start;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.gm-chat__msg--user {
    align-self: flex-end;
    background: rgba(148, 163, 184, 0.15);
}
.gm-chat__msg--error {
    align-self: stretch;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 0.85rem;
    text-align: center;
}
.gm-chat__typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
}
.gm-chat__typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(226, 232, 240, 0.6);
    animation: gm-blink 1.2s infinite;
}
.gm-chat__typing span:nth-child(2) { animation-delay: 0.2s; }
.gm-chat__typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes gm-blink {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

.gm-chat__footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}
.gm-chat__input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    resize: none;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 0.625rem 0.875rem;
    color: inherit;
    font: inherit;
    font-size: 0.9rem;
    outline: none;
}
.gm-chat__input:focus { border-color: rgba(99, 102, 241, 0.6); }
.gm-chat__send {
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.625rem 1rem;
    font: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
}
.gm-chat__send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Turnstile widget container — Cloudflare injects into this */
.gm-chat__turnstile {
    padding: 0 1.25rem 0.75rem;
}
.gm-chat__turnstile:empty { display: none; }

.gm-chat__disclaimer {
    padding: 0 1.25rem 0.75rem;
    font-size: 0.7rem;
    opacity: 0.55;
    text-align: center;
}

/* ═══════════ Mini-form (contact capture) ═══════════ */
.gm-chat__miniform {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    margin-top: 0.5rem;
}
.gm-chat__miniform-intro {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 0 0.25rem;
}
.gm-chat__field {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    color: #e2e8f0;
    font: inherit;
    font-size: 0.9rem;
    outline: none;
}
.gm-chat__field:focus { border-color: rgba(99, 102, 241, 0.6); }
.gm-chat__miniform-consent {
    font-size: 0.72rem;
    opacity: 0.6;
    margin: 0.25rem 0 0;
    line-height: 1.4;
}
.gm-chat__send--wide {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.25rem;
}

/* ═══════════ Generating state ═══════════ */
.gm-chat__generating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    text-align: center;
}
.gm-chat__generating p { margin: 0; font-size: 0.9rem; }
.gm-chat__generating-sub { font-size: 0.8rem; opacity: 0.6; }
.gm-chat__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: gm-spin 0.8s linear infinite;
}
@keyframes gm-spin { to { transform: rotate(360deg); } }

/* ═══════════ Quote card ═══════════ */
.gm-quote-card {
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 14px;
    padding: 1.25rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.gm-quote-card__header { display: flex; flex-direction: column; gap: 0.375rem; }
.gm-quote-card__badge {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    background: rgba(99, 102, 241, 0.25);
    border-radius: 999px;
    color: #c7d2fe;
}
.gm-quote-card__badge--review {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}
.gm-quote-card__header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
}
.gm-quote-card__price {
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.15);
}
.gm-quote-card__range {
    font-size: 1.5rem;
    font-weight: 700;
    color: #c7d2fe;
    line-height: 1.2;
}
.gm-quote-card__price-notes {
    margin-top: 0.375rem;
    font-size: 0.78rem;
    opacity: 0.75;
    line-height: 1.4;
}
.gm-quote-card__scope h4,
.gm-quote-card__sample h4 {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
}
.gm-quote-card__scope ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.gm-quote-card__scope li {
    padding-left: 1.125rem;
    position: relative;
    font-size: 0.85rem;
    line-height: 1.45;
}
.gm-quote-card__scope li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #6366f1;
    font-weight: 700;
}
.gm-quote-card__sample-body {
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre-wrap;
    max-height: 260px;
    overflow-y: auto;
}
.gm-quote-card__disclaimer {
    font-size: 0.72rem;
    opacity: 0.6;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}
.gm-quote-card__cta {
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s ease, transform 0.1s ease;
}
.gm-quote-card__cta:hover { background: #4f46e5; transform: translateY(-1px); }
.gm-quote-card__cta--secondary {
    background: rgba(148, 163, 184, 0.15);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.25);
}
.gm-quote-card__cta--secondary:hover { background: rgba(148, 163, 184, 0.25); }
.gm-quote-card--holding .gm-quote-card__holding-msg {
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0;
}
.gm-quote-card--holding .gm-quote-card__holding-sub {
    font-size: 0.78rem;
    opacity: 0.7;
    margin: 0;
}
