/*
 * A yard's demo page only (/sell/{state}/{slug}): a stand-in for the yard's own
 * site around the form, and the form in the yard's colors. The real embed never
 * loads this file. Same cache contract as embed.v1.css: change it, bump to v2.
 */

.ib-page {
    --brand-primary: hsl(223 70% 40%);
    --brand-on-primary: hsl(0 0% 100%);

    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: var(--brand-font-body, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    color: hsl(240 10% 3.9%);
    background-color: hsl(240 5% 96%);
}

.ib-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background-color: hsl(0 0% 100%);
    border-bottom: 1px solid hsl(240 6% 88%);
}

.ib-page-header-branded {
    color: var(--brand-header-fg, hsl(0 0% 100%));
    background-color: var(--brand-header-bg);
    border-bottom: 0;
}

.ib-page-yard {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.ib-page-logo {
    display: block;
    height: 3rem;
    width: auto;
    max-width: min(15rem, 60vw);
    object-fit: contain;
}

/* A light logo, taken off the yard's dark header, on a header that is not dark. */
.ib-page-logo-dark {
    box-sizing: border-box;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    background-color: hsl(0 0% 16%);
}

.ib-page-name,
.ib-page-strip-title {
    font-family: var(--brand-font-heading, inherit);
}

.ib-page-name {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.2;
}

.ib-page-city {
    display: block;
    font-size: 0.75rem;
    opacity: 0.75;
}

.ib-page-call {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

.ib-page-call:hover {
    text-decoration: underline;
}

.ib-page-strip {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: var(--brand-on-primary);
    background-color: var(--brand-primary);
}

.ib-page-strip-branded {
    color: var(--brand-nav-fg, hsl(0 0% 100%));
    background-color: var(--brand-nav-bg);
}

.ib-page-strip-title {
    font-size: 1.0625rem;
    font-weight: 700;
}

.ib-page-strip-tag {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-accent, inherit);
}

.ib-page-main {
    flex: 1;
    padding: 1.5rem 1rem;
}

.ib-page-footer {
    padding: 1rem;
    font-size: 0.75rem;
    text-align: center;
    color: hsl(240 4% 46%);
    border-top: 1px solid hsl(240 6% 88%);
}

.ib-tile {
    display: inline-flex;
    flex: 0 0 2.5rem;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.25rem;
    box-sizing: border-box;
    overflow: hidden;
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(212 12% 40%);
    background-color: hsl(0 0% 100%);
    border: 1px solid hsl(212 18% 87%);
    border-radius: 0.5625rem;
}

.ib-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ib-tile-dark {
    background-color: hsl(0 0% 16%);
    border-color: transparent;
}

/* .ib declares these as constants; here they follow the yard's primary color. */
.ib.ib-brand {
    font-family: var(--ib-font, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    --ib-primary-strong: color-mix(in srgb, var(--ib-primary) 85%, black);
    --ib-primary-tint: color-mix(in srgb, var(--ib-primary) 7%, white);
    --ib-shadow-button: 0 1px 2px color-mix(in srgb, var(--ib-primary) 35%, transparent);
}

/* Outlines, borders and links sit on white, where a light brand color like yellow
   disappears. primaryText is the same color darkened until it reads on white. */
.ib-brand :where(input, select, textarea, button, a):focus-visible {
    outline-color: var(--ib-primary-text, var(--ib-primary));
}

.ib-brand .ib-input:focus-visible,
.ib-brand .ib-choice:has(input:checked) {
    border-color: var(--ib-primary-text, var(--ib-primary));
}

.ib-brand .ib-choice:has(input:checked) {
    box-shadow: inset 0 0 0 1px var(--ib-primary-text, var(--ib-primary));
}

.ib-brand .ib-choice input {
    accent-color: var(--ib-primary-text, var(--ib-primary));
}

.ib-brand .ib-demo-link:focus-visible {
    outline: 2px solid var(--ib-primary-text, var(--ib-primary));
    outline-offset: 2px;
}

.ib-demo {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ib-border);
}

.ib-demo-title {
    margin: 0;
    font-size: var(--ib-text-lg);
    font-weight: 600;
}

.ib-demo-text {
    margin: 0.375rem 0 1.25rem;
    color: var(--ib-muted-fg);
}

.ib-demo-link {
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
}
