/*
 * hc-ui.css — shared HeroChat demo UI kit.
 *
 * Design tokens + components lifted from customers.herochat.de/portal.css
 * (which in turn derives from sales-website/skin.css) so the demo detail
 * and overview pages stay visually aligned with the customer portal.
 *
 * Adds: browser-window frame, demo card grid, LIVE/DEV + Chat/Tickets
 * segmented toggles. Dark ("dev") theme is toggled via `body.hc-dark`.
 */

@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,600,700');

:root {
    --hc-text: #283c4a;
    --hc-text-muted: #566069;
    --hc-primary: #049cff;
    --hc-primary-hover: #279cff;
    --hc-surface: #ffffff;
    --hc-surface-tint: #e4f1fa;
    --hc-border: #d3d7df;
    --hc-bg: #f7f9fb;
    --hc-radius: 6px;
    --hc-shadow-sm: 0 3px 6px rgba(0, 0, 0, .08);
    --hc-shadow-md: 0 3px 20px -2px rgba(20, 45, 100, .1);
    --hc-font: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body.hc-dark {
    --hc-text: #e6edf3;
    --hc-text-muted: #9aa4ad;
    --hc-primary: #1ea7ff;
    --hc-primary-hover: #4ab8ff;
    --hc-surface: #1b2530;
    --hc-surface-tint: #243140;
    --hc-border: #2c3a4a;
    --hc-bg: #0f1620;
    --hc-shadow-sm: 0 3px 6px rgba(0, 0, 0, .35);
    --hc-shadow-md: 0 3px 20px -2px rgba(0, 0, 0, .45);
}

/* ---------- base ---------- */

.hc-page {
    font-family: var(--hc-font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--hc-text-muted);
    background: var(--hc-bg);
    margin: 0;
    transition: background .2s, color .2s;
}

.hc-page h1,
.hc-page h2,
.hc-page h3 {
    color: var(--hc-text);
    font-weight: 600;
    margin: 0;
}

.hc-page a {
    color: var(--hc-primary);
    text-decoration: none;
}

.hc-page a:hover {
    color: var(--hc-primary-hover);
}

/* ---------- overview shell ---------- */

.hc-wrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}

.hc-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.hc-head-titles h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.hc-head-titles p {
    margin: 4px 0 0;
    font-size: 15px;
    color: var(--hc-text-muted);
}

.hc-head .hc-spacer {
    margin-left: auto;
}

.hc-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hc-input {
    width: 100%;
    padding: 11px 16px;
    font-family: var(--hc-font);
    font-size: 15px;
    color: var(--hc-text);
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    box-sizing: border-box;
    transition: border-color .15s;
}

.hc-input:focus {
    outline: none;
    border-color: var(--hc-primary);
}

.hc-search {
    flex: 1;
    min-width: 220px;
    max-width: 460px;
}

/* ---------- segmented toggle (LIVE/DEV, Chat/Tickets) ---------- */

.hc-seg {
    display: inline-flex;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    overflow: hidden;
    background: var(--hc-surface);
    flex: 0 0 auto;
}

.hc-seg-opt {
    background: transparent;
    border: 0;
    padding: 8px 16px;
    font-family: var(--hc-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--hc-text-muted);
    text-decoration: none;
    cursor: pointer;
    line-height: 1.4;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hc-seg-opt + .hc-seg-opt {
    border-left: 1px solid var(--hc-border);
}

.hc-seg-opt.is-on {
    background: var(--hc-primary);
    color: #fff;
}

.hc-seg-opt:not(.is-on):hover {
    background: var(--hc-surface-tint);
    color: var(--hc-text);
}

/* Keep link-based toggles (detail page uses <a>) from picking up link color. */
.hc-page a.hc-seg-opt { color: var(--hc-text-muted); }
.hc-page a.hc-seg-opt.is-on { color: #fff; }
.hc-page a.hc-seg-opt:not(.is-on):hover { color: var(--hc-text); }

/* ---------- demo grid ---------- */

.hc-demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.hc-demo-card {
    display: flex;
    flex-direction: column;
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: 10px;
    box-shadow: var(--hc-shadow-sm);
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}

.hc-demo-card:hover {
    box-shadow: 0 10px 28px rgba(20, 60, 77, .14);
    transform: translateY(-2px);
}

/* ---------- browser-window frame ---------- */

.hc-demo-shot-link {
    display: block;
    text-decoration: none;
}

.hc-browser {
    display: block;
    background: var(--hc-surface-tint);
    border-bottom: 1px solid var(--hc-border);
}

.hc-browser-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
}

.hc-dots {
    display: inline-flex;
    gap: 6px;
    flex: 0 0 auto;
}

.hc-dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.hc-dots i:nth-child(1) { background: #ff5f57; }
.hc-dots i:nth-child(2) { background: #febc2e; }
.hc-dots i:nth-child(3) { background: #28c840; }

.hc-browser-url {
    flex: 1;
    min-width: 0;
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--hc-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hc-browser-shot {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top center;
    background: var(--hc-bg);
}

/* ---------- card body ---------- */

.hc-demo-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
}

.hc-demo-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--hc-text);
    line-height: 1.3;
}

.hc-demo-desc {
    font-size: 14px;
    color: var(--hc-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hc-demo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hc-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 9px;
    border-radius: 20px;
    background: var(--hc-surface-tint);
    color: var(--hc-primary);
    border: 0;
    cursor: pointer;
    font-family: var(--hc-font);
}

.hc-tag.is-on {
    background: var(--hc-primary);
    color: #fff;
}

.hc-demo-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
}

.hc-demo-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--hc-primary);
}

.hc-demo-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hc-primary);
}

.hc-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--hc-text-muted);
    font-size: 15px;
}

/* ---------- detail-page floating toolbar ---------- */

.hc-detail-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--hc-font);
}

@media screen and (max-width: 600px) {
    .hc-detail-bar {
        top: auto;
        bottom: 20px;
        right: 20px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}
