/*
 * Izakaya design system component styles — copied from project/components/bundle.css of the design system.
 * Keep this file in sync with the design system; put page-specific layout in scoped .razor.css files.
 * Fonts are loaded in App.razor.
 */

/* ---------- base ---------- */
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 26px;
    background: var(--surface);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.iz-stage {
    padding: var(--space-6);
    box-sizing: border-box;
}

.iz-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

.iz-stack {
    display: grid;
    gap: var(--space-4);
}

.iz-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.iz-focusable:focus-visible, .iz-btn:focus-visible, .iz-chip:focus-visible, .iz-slot:focus-visible, .iz-nav a:focus-visible, .iz-iconbtn:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--focus-ring);
}

/* ---------- Button ---------- */
.iz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    height: 44px;
    padding: 0 var(--space-6);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s, border-color .15s, transform .15s;
    box-sizing: border-box;
}

.iz-btn:active {
    transform: translateY(1px);
}

.iz-btn-lg {
    height: 52px;
    font-size: 17px;
    padding: 0 var(--space-8);
}

.iz-btn-sm {
    height: 36px;
    font-size: 14px;
    padding: 0 var(--space-4);
}

.iz-btn-block {
    width: 100%;
}

.iz-btn-primary {
    background: var(--red);
    color: var(--on-red);
}

.iz-btn-primary:hover {
    filter: brightness(.9);
}

.iz-btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}

.iz-btn-secondary:hover {
    background: var(--ink);
    color: var(--surface);
}

.iz-btn-ghost {
    background: transparent;
    color: var(--ink);
    padding: 0 var(--space-3);
}

.iz-btn-ghost:hover {
    background: var(--surface-sunken);
}

.iz-btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.iz-btn .iz-arrow {
    transition: transform .15s;
}

.iz-btn:hover .iz-arrow {
    transform: translateX(3px);
}

/* ---------- Badge ---------- */
.iz-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--surface-sunken);
    color: var(--ink);
    white-space: nowrap;
}

.iz-badge-red {
    background: var(--red-soft);
    color: var(--red-text);
}

.iz-badge-matcha {
    background: var(--matcha-soft);
    color: var(--matcha);
}

.iz-badge-amber {
    background: var(--amber-soft);
    color: var(--amber);
}

.iz-badge-outline {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--line-strong);
    color: var(--ink-muted);
}

.iz-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

/* ---------- SectionHeader ---------- */
.iz-sh {
    max-width: 720px;
}

.iz-sh-center {
    margin: 0 auto;
    text-align: center;
}

.iz-eyebrow {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
}

.iz-sh-center .iz-eyebrow {
    justify-content: center;
}

.iz-eyebrow-jp {
    font-family: var(--font-jp);
    font-size: 14px;
    letter-spacing: .2em;
    font-weight: 500;
    color: var(--ink-muted);
    text-transform: none;
}

.iz-sh-title {
    font-family: var(--font-display);
    font-size: 44px;
    line-height: 50px;
    font-weight: 700;
    letter-spacing: -.015em;
    margin: var(--space-3) 0 0;
}

.iz-sh-title-xl {
    font-size: 64px;
    line-height: 68px;
    letter-spacing: -.02em;
}

.iz-dash {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--red);
    margin-top: var(--space-4);
}

.iz-sh-center .iz-dash {
    margin-left: auto;
    margin-right: auto;
}

.iz-sh-lead {
    font-size: 18px;
    line-height: 28px;
    color: var(--ink-muted);
    margin: var(--space-4) 0 0;
}

.iz-accent {
    color: var(--red);
}

@media (max-width: 640px) {
    .iz-sh-title {
        font-size: 32px;
        line-height: 38px;
    }

    .iz-sh-title-xl {
        font-size: 40px;
        line-height: 44px;
    }
}

/* ---------- Form fields ---------- */
.iz-field {
    display: grid;
    gap: 6px;
}

.iz-label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--ink);
}

.iz-req {
    color: var(--red-text);
    margin-left: 2px;
}

.iz-input {
    font: inherit;
    font-size: 16px;
    line-height: 24px;
    color: var(--ink);
    background: var(--surface-raised);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s;
}

.iz-input::placeholder {
    color: var(--ink-muted);
    opacity: .8;
}

.iz-input:hover {
    border-color: var(--ink-muted);
}

.iz-input:focus {
    outline: 2px solid transparent;
    border-color: var(--ink);
    box-shadow: var(--focus-ring);
}

input.iz-input, select.iz-input {
    height: 47px;
    padding-top: 0;
    padding-bottom: 0;
}

textarea.iz-input {
    min-height: 120px;
    resize: vertical;
}

select.iz-input {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
}

.iz-input[aria-invalid="true"] {
    border-color: var(--red-text);
}

.iz-hint {
    font-size: 14px;
    line-height: 20px;
    color: var(--ink-muted);
}

.iz-error {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--red-text);
}

.iz-error svg {
    flex: none;
    margin-top: 2px;
}

.iz-check {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    color: var(--ink-muted);
}

.iz-check input {
    appearance: none;
    flex: none;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
    display: grid;
    place-content: center;
    cursor: pointer;
}

.iz-check input::after {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--on-red);
    border-bottom: 2px solid var(--on-red);
    transform: rotate(-45deg) translate(1px, -1px);
    opacity: 0;
}

.iz-check input:checked {
    background: var(--red);
    border-color: var(--red);
}

.iz-check input:checked::after {
    opacity: 1;
}

.iz-check input:focus-visible {
    outline: 2px solid transparent;
    box-shadow: var(--focus-ring);
}

.iz-check a {
    color: var(--link);
}

/* ---------- Fold (origami corner) ---------- */
.iz-fold {
    position: relative;
    clip-path: polygon(0 0, calc(100% - var(--fold, var(--fold-lg))) 0, 100% var(--fold, var(--fold-lg)), 100% 100%, 0 100%);
}

.iz-fold::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: var(--fold, var(--fold-lg));
    height: var(--fold, var(--fold-lg));
    background: var(--red);
    clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.iz-fold-sm {
    --fold: var(--fold-sm);
}

/* ---------- ContactForm ---------- */
.iz-cf {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-12);
    display: grid;
    gap: var(--space-4);
    max-width: 640px;
    box-sizing: border-box;
}

.iz-cf-title {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 34px;
    font-weight: 600;
    margin: 0;
}

.iz-cf-lead {
    margin: calc(var(--space-2) * -1) 0 var(--space-2);
    color: var(--ink-muted);
}

.iz-cf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.iz-cf-done {
    display: grid;
    gap: var(--space-3);
    justify-items: start;
}

.iz-cf-done-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--matcha-soft);
    color: var(--matcha);
}

@media (max-width: 640px) {
    .iz-cf {
        padding: var(--space-6);
    }

    .iz-cf-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- LessonCard ---------- */
.iz-lc {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    transition: box-shadow .2s, transform .2s;
    box-sizing: border-box;
    height: 100%;
}

.iz-lc:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.iz-lc-top {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    padding-right: var(--space-6);
}

.iz-lc-title {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 28px;
    font-weight: 600;
    margin: 0;
}

.iz-lc-desc {
    margin: 0;
    color: var(--ink-muted);
}

.iz-lc-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.iz-lc-meta dt {
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.iz-lc-meta dd {
    margin: 2px 0 0;
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
}

.iz-lc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-2);
    font-size: 15px;
    line-height: 22px;
}

.iz-lc-list li {
    display: flex;
    gap: var(--space-2);
}

.iz-lc-list li::before {
    content: "";
    flex: none;
    width: 10px;
    height: 2px;
    background: var(--red);
    margin-top: 10px;
}

.iz-lc-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.iz-lc-price {
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 28px;
    font-weight: 700;
}

.iz-lc-price small {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
}

/* ---------- WeekSchedule ---------- */
.iz-ws {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.iz-ws-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--line);
}

.iz-ws-nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.iz-ws-range {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    line-height: 24px;
    min-width: 190px;
    text-align: center;
}

.iz-iconbtn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--line-strong);
    background: var(--surface-raised);
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.iz-iconbtn:hover {
    border-color: var(--ink);
}

.iz-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.iz-chip {
    font: inherit;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.iz-chip[aria-pressed="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--surface);
}

.iz-ws-grid {
    display: grid;
    grid-template-columns: repeat(var(--iz-days, 6), minmax(0, 1fr));
}

.iz-ws-day {
    border-right: 1px solid var(--line);
    min-height: 220px;
    display: flex;
    flex-direction: column;
}

.iz-ws-day:last-child {
    border-right: 0;
}

.iz-ws-dayhead {
    padding: var(--space-3) var(--space-3) var(--space-2);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.iz-ws-dow {
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.iz-ws-date {
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 24px;
    font-weight: 600;
}

.iz-ws-today .iz-ws-date {
    color: var(--on-red);
    background: var(--red);
    border-radius: var(--radius-sm);
    padding: 0 6px;
}

.iz-ws-slots {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-3);
    align-content: start;
    flex: 1;
    background: var(--surface-sunken);
}

.iz-ws-empty {
    font-size: 13px;
    line-height: 18px;
    color: var(--ink-muted);
    padding: var(--space-2) 0;
}

.iz-slot {
    font: inherit;
    text-align: left;
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--line);
    background: var(--surface-raised);
    color: var(--ink);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.iz-slot:hover {
    border-color: var(--ink-muted);
}

.iz-slot-time {
    font-size: 13px;
    line-height: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.iz-slot-name {
    font-size: 14px;
    line-height: 19px;
    font-weight: 600;
}

.iz-slot-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    margin-top: 4px;
}

.iz-slot-free .iz-slot-status {
    color: var(--matcha);
}

.iz-slot-few .iz-slot-status {
    color: var(--amber);
}

.iz-slot-full {
    cursor: default;
    background: transparent;
    border-style: dashed;
}

.iz-slot-full .iz-slot-name, .iz-slot-full .iz-slot-time {
    color: var(--ink-muted);
}

.iz-slot-full .iz-slot-status {
    color: var(--ink-muted);
}

.iz-slot[aria-pressed="true"] {
    border-color: var(--red);
    background: var(--red-soft);
}

.iz-slot[aria-pressed="true"] .iz-slot-name {
    color: var(--red-text);
}

.iz-ws-detail {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--line);
}

.iz-ws-detail h4 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 26px;
    font-weight: 600;
}

.iz-ws-detail p {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--ink-muted);
}

.iz-ws-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: 13px;
    line-height: 18px;
    color: var(--ink-muted);
    padding: var(--space-3) var(--space-6);
    border-top: 1px solid var(--line);
}

.iz-ws-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 720px) {
    .iz-ws-grid {
        grid-template-columns: 1fr;
    }

    .iz-ws-day {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        min-height: 0;
    }

    .iz-ws-bar, .iz-ws-detail, .iz-ws-legend {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
}

/* ---------- MethodSteps ---------- */
.iz-ms {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--iz-cols, 4), minmax(0, 1fr));
    gap: var(--space-6);
    counter-reset: iz-step;
}

.iz-ms li {
    position: relative;
    padding-top: var(--space-6);
    border-top: 2px solid var(--ink);
}

.iz-ms-num {
    font-family: var(--font-display);
    font-size: 44px;
    line-height: 44px;
    font-weight: 700;
    color: var(--red);
    letter-spacing: -.02em;
}

.iz-ms-jp {
    font-family: var(--font-jp);
    font-size: 13px;
    letter-spacing: .2em;
    color: var(--ink-muted);
    margin-left: var(--space-2);
}

.iz-ms h3 {
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 26px;
    font-weight: 600;
    margin: var(--space-3) 0 var(--space-2);
}

.iz-ms p {
    margin: 0;
    color: var(--ink-muted);
    font-size: 15px;
    line-height: 24px;
}

@media (max-width: 860px) {
    .iz-ms {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .iz-ms {
        grid-template-columns: 1fr;
    }
}

/* ---------- Navbar ---------- */
.iz-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    padding: var(--space-3) var(--space-6);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.iz-nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: var(--ink);
}

.iz-nav-brand img {
    height: 40px;
    width: auto;
    display: block;
}

.iz-nav-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    line-height: 20px;
    letter-spacing: .04em;
}

.iz-nav-sub {
    display: block;
    font-size: 11px;
    line-height: 14px;
    letter-spacing: .14em;
    color: var(--ink-muted);
    font-weight: 600;
}

.iz-nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
    margin: 0;
    padding: 0;
}

.iz-nav-links a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    line-height: 20px;
    position: relative;
}

.iz-nav-links a:hover {
    background: var(--surface-sunken);
}

.iz-nav-links a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 3px;
    border-radius: 2px;
    background: var(--red);
}

.iz-nav-toggle {
    display: none;
}

@media (max-width: 820px) {
    .iz-nav {
        flex-wrap: wrap;
        padding: var(--space-3) var(--space-4);
    }

    .iz-nav-toggle {
        display: grid;
    }

    .iz-nav-links, .iz-nav-cta {
        display: none;
    }

    .iz-nav-open .iz-nav-links {
        display: grid;
        width: 100%;
        order: 3;
    }

    .iz-nav-open .iz-nav-cta {
        display: inline-flex;
        order: 4;
        width: 100%;
    }
}
