/*!
 * yh-polish.css — additive UI/UX polish for YallowHost.
 *
 * Hand-authored, build-free layer loaded with a plain <link> AFTER the compiled
 * Vite bundle, so it can refine the brand without recompiling app.scss (the SCSS
 * toolchain is not part of this deployment). It only uses the existing --yh-*
 * custom properties, so it stays on-brand and theme-safe. Purely visual — no
 * layout/logic dependencies. Safe to remove by deleting this file + its <link>s.
 */

/* ---- Quick actions (customer dashboard) ---- */
.yh-quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .yh-quick {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.yh-quick__tile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 0.85rem;
    background: var(--yh-surface);
    border: 1px solid color-mix(in srgb, var(--yh-muted) 16%, transparent);
    box-shadow: var(--yh-shadow-sm, 0 1px 2px rgba(120, 72, 30, 0.06));
    color: var(--yh-strong);
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.yh-quick__tile:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--yh-accent) 45%, transparent);
    box-shadow: var(--yh-shadow-md, 0 8px 22px rgba(120, 72, 30, 0.12));
    color: var(--yh-strong);
}

.yh-quick__ic {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.7rem;
    color: var(--yh-accent-ink, #b45309);
    background: color-mix(in srgb, var(--yh-accent) 16%, var(--yh-surface));
}

.yh-quick__tile .yh-quick__lbl {
    font-weight: 600;
    line-height: 1.15;
}

.yh-quick__tile .yh-quick__sub {
    font-size: 0.78rem;
    color: var(--yh-muted);
}

/* ---- Subtle, brand-safe refinements ---- */
/* Clearer keyboard focus on form controls, using the brand accent. */
.form-control:focus,
.form-select:focus {
    border-color: color-mix(in srgb, var(--yh-accent) 55%, transparent);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--yh-accent) 22%, transparent);
}

/* Gentle lift on primary CTAs so the main action reads as the main action. */
.btn-primary {
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--yh-accent) 30%, transparent);
}

/* Copy buttons feel tappable on mobile. */
.yh-copy-btn {
    white-space: nowrap;
}

/* Slightly roomier list rows on small screens for easier scanning/tapping. */
@media (max-width: 575.98px) {
    .yh-list-row {
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
    }
}

/* Respect reduced-motion preferences for all the transitions above. */
@media (prefers-reduced-motion: reduce) {
    .yh-quick__tile,
    .btn-primary {
        transition: none;
    }
    .yh-quick__tile:hover,
    .btn-primary:hover {
        transform: none;
    }
}

/* ============================================================ Transfer / Migrations landing */
/* Structural-only helpers for the public /transfer-to-us page. Entrance motion is
   handled by the existing .yh-reveal/.yh-stagger layer (yh-motion.css/js), so these
   stay reduced-motion-safe by construction. Brand-token driven; build-free. */

/* Vertical migration journey timeline. */
.yh-journey { position: relative; list-style: none; margin: 0; padding: 0; }
.yh-journey::before {
    content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px;
    background: linear-gradient(180deg, var(--yh-accent), color-mix(in srgb, var(--yh-accent) 14%, transparent));
    border-radius: 2px;
}
.yh-journey__item { position: relative; padding: 0 0 1.7rem 3.5rem; }
.yh-journey__item:last-child { padding-bottom: 0; }
.yh-journey__dot {
    position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; background: var(--yh-surface);
    border: 2px solid var(--yh-accent); color: var(--yh-accent-ink);
    font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: .85rem;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--yh-accent) 8%, transparent);
}
.yh-journey__item h3 { color: var(--yh-strong); margin-bottom: .2rem; }

/* Soft brand halo behind a heading block — decorative. The glow must stay inside
   the block's own width: extending past the right edge (the old -10% inset) put
   ~25px of horizontal scroll on 390px viewports (transfer landing). The gradient
   already fades out by 70%, so the narrower box is visually identical. */
.yh-halo { position: relative; }
.yh-halo::before {
    content: ""; position: absolute; z-index: 0; inset: -30% 0 auto 0; height: 300px;
    background: radial-gradient(55% 100% at 50% 0%, color-mix(in srgb, var(--yh-accent) 13%, transparent), transparent 70%);
    pointer-events: none;
}
.yh-halo > * { position: relative; z-index: 1; }

/* Subtle continuous float for a single decorative hero panel (gated to .yh-motion). */
@keyframes yh-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.yh-motion .yh-float { animation: yh-float 7.5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .yh-motion .yh-float { animation: none !important; transform: none !important; }
}

/* ============================================================================
   Chatbot widget (C4) — bottom-LEFT launcher + panel, so it never collides with
   the bottom-right Support Assistant FAB. Rendered only when the ChatbotGate is
   fully enabled; disabled by default. z-index below Bootstrap offcanvas (1045).
   ============================================================================ */
.yh-chatbot-fab {
    position: fixed; left: 1.25rem; bottom: 1.25rem; z-index: 1030;
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .7rem 1.1rem; border: 0; border-radius: 999px;
    background: var(--yh-accent); color: var(--yh-on-accent);
    font-weight: 600; cursor: pointer;
    box-shadow: var(--yh-shadow-md); transition: transform .15s ease, box-shadow .15s ease;
}
.yh-chatbot-fab:hover, .yh-chatbot-fab:focus-visible { transform: translateY(-2px); box-shadow: var(--yh-shadow-lg); }
.yh-chatbot-fab:focus-visible { outline: 2px solid var(--yh-accent-ink); outline-offset: 2px; }
@media (max-width: 575.98px) {
    .yh-chatbot-fab { padding: .7rem; }
    .yh-chatbot-fab__label { display: none; }
}

.yh-chatbot-panel {
    position: fixed; left: 1.25rem; bottom: 5.25rem; z-index: 1031;
    width: min(360px, calc(100vw - 2.5rem)); max-height: min(70vh, 560px);
    display: flex; flex-direction: column;
    background: var(--yh-surface); color: var(--yh-text);
    border: 1px solid var(--yh-line); border-radius: 16px;
    box-shadow: var(--yh-shadow-lg); overflow: hidden;
}
.yh-chatbot-panel__head { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid var(--yh-line); }
.yh-chatbot-panel__title { font-size: 1rem; font-weight: 600; margin: 0; color: var(--yh-strong); }
.yh-chatbot-panel__close { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--yh-text); padding: 0 .25rem; }
.yh-chatbot-panel__close:focus-visible { outline: 2px solid var(--yh-accent-ink); outline-offset: 2px; }
.yh-chatbot-panel__note { font-size: .8rem; color: var(--yh-muted-2, #6b7280); padding: .6rem 1rem 0; margin: 0; }
.yh-chatbot-panel__note a { color: var(--yh-accent-ink); }

.yh-chatbot-log { flex: 1 1 auto; overflow-y: auto; padding: .75rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.yh-chatbot-msg { padding: .5rem .75rem; border-radius: 12px; font-size: .9rem; max-width: 85%; white-space: pre-wrap; word-wrap: break-word; }
.yh-chatbot-msg--user { align-self: flex-end; background: var(--yh-accent); color: var(--yh-on-accent); }
.yh-chatbot-msg--bot { align-self: flex-start; background: var(--yh-elevated, rgba(0,0,0,.05)); color: var(--yh-text); }
.yh-chatbot-sources { display: flex; flex-direction: column; gap: .15rem; font-size: .82rem; }
.yh-chatbot-sources__label { color: var(--yh-muted-2, #6b7280); font-weight: 600; }
.yh-chatbot-sources a, .yh-chatbot-support-link { color: var(--yh-accent-ink); text-decoration: none; }
.yh-chatbot-sources a:hover, .yh-chatbot-support-link:hover { text-decoration: underline; }
.yh-chatbot-support-link { display: inline-block; margin-top: .25rem; font-size: .82rem; font-weight: 600; }

.yh-chatbot-form { display: flex; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid var(--yh-line); }
.yh-chatbot-input { flex: 1 1 auto; padding: .5rem .7rem; border: 1px solid var(--yh-line); border-radius: 10px; background: var(--yh-surface); color: var(--yh-text); font-size: .9rem; }
.yh-chatbot-input:focus-visible { outline: 2px solid var(--yh-accent-ink); outline-offset: 1px; }
.yh-chatbot-send { border: 0; border-radius: 10px; padding: .5rem 1rem; background: var(--yh-accent); color: var(--yh-on-accent); font-weight: 600; cursor: pointer; }
.yh-chatbot-send:disabled { opacity: .6; cursor: default; }
.yh-chatbot-send:focus-visible { outline: 2px solid var(--yh-accent-ink); outline-offset: 2px; }
