/* =====================================================================
   Checkout page ("yo-"): steps, sign-in / delivery card and order summary.
   Shares the summary, buttons and phone bar with the cart page (cart.css, "yc-").
   ===================================================================== */

.yo { padding-bottom: 40px; }
.yo svg { flex: none; }

/* ---------- steps ---------- */
.yo-steps { display: flex; align-items: center; gap: 0; margin: 4px 0 20px; padding: 0; list-style: none; counter-reset: s; }
.yo-steps li { position: relative; display: flex; flex: 1; align-items: center; gap: 10px; color: var(--yp-muted); font-size: .88rem; font-weight: 700; }
.yo-steps li + li::before { content: ""; flex: 1; height: 2px; margin-inline: 8px; border-radius: 2px; background: var(--yd-edge, #e8dcc0); order: -1; min-width: 14px; }
.yo-steps li:first-child { flex: 0 0 auto; }
.yo-steps i { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--yd-soft, #f3ecdb); box-shadow: inset 0 0 0 1.5px var(--yd-edge, #e8dcc0); color: var(--yp-muted); font-style: normal; font-weight: 900; font-size: .9rem; }
.yo-steps i svg { width: 18px; height: 18px; }
.yo-steps li.is-done { color: var(--yh-green-2, #2c6a3d); }
.yo-steps li.is-done i { background: var(--yh-green-2, #2c6a3d); box-shadow: none; color: #fff; }
.yo-steps li.is-done + li::before, .yo-steps li.is-current::before { background: var(--yh-green-2, #2c6a3d); }
.yo-steps li.is-current { color: var(--yp-text); }
.yo-steps li.is-current i { background: linear-gradient(135deg, var(--yh-gold-2, #f8cf6a), var(--yh-gold, #f5b83d)); color: #2a1d05; box-shadow: 0 0 0 4px rgba(245, 184, 61, .25); }
@media (max-width: 575.98px) { .yo-steps span { font-size: .78rem; } .yo-steps li:not(.is-current) span { display: none; } .yo-steps li.is-done span { display: none; } }

/* ---------- layout ---------- */
.yo-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 992px) { .yo-layout { grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; } }
.yo-main { display: grid; gap: 14px; min-width: 0; }

/* ---------- card ---------- */
.yo-card { display: grid; gap: 16px; padding: 22px 20px; border-radius: 22px; background: var(--yd-box, linear-gradient(180deg, #fff, #fffcf6)); box-shadow: var(--yd-shadow, 0 0 0 1px #efe4cd, 0 14px 28px -22px rgba(90, 60, 20, .55)); }
@media (min-width: 768px) { .yo-card { padding: 28px 30px; } }
.yo-card__head { display: flex; align-items: center; gap: 14px; }
.yo-card__icon { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 16px; background: linear-gradient(135deg, #eaf5e1, #d8ecc8); color: var(--yh-green-2, #2c6a3d); }
.yo-card__icon svg { width: 26px; height: 26px; }
:root[data-theme="dark"] .yo-card__icon { background: rgba(124, 196, 143, .16); color: #8fdca3; }
.yo-card__head h1 { margin: 0; font-size: 1.2rem; font-weight: 900; color: var(--yp-text); }
.yo-card__head p { margin: 2px 0 0; color: var(--yp-muted); font-size: .86rem; line-height: 1.9; }
.yo-card__head p b { color: var(--yp-text); }

/* ---------- fields ---------- */
.yo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .yo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .yo-field--full { grid-column: 1 / -1; } }

.yo-field { display: grid; gap: 6px; margin: 0; }
.yo-field > span { color: var(--yp-text); font-size: .84rem; font-weight: 800; }
.yo-input {
    width: 100%;
    min-height: 50px;
    padding: 10px 14px;
    border: 0;
    border-radius: 14px;
    background: var(--yd-soft, #f6efdc);
    box-shadow: inset 0 0 0 1.5px var(--yd-edge, #e8dcc0);
    color: var(--yp-text);
    font: inherit;
    font-size: 16px;   /* 16px stops iOS from zooming on focus */
    outline: none;
    transition: box-shadow .2s, background .2s;
}
textarea.yo-input { min-height: 96px; resize: vertical; line-height: 1.9; }
.yo-input::placeholder { color: var(--yp-muted); opacity: .7; }
.yo-input:focus { background: var(--yp-surface, #fff); box-shadow: inset 0 0 0 2px var(--yh-gold, #f5b83d), 0 0 0 4px rgba(245, 184, 61, .25); }
.yo-field.is-bad .yo-input { box-shadow: inset 0 0 0 2px #e5484d; background: #fff6f6; }
:root[data-theme="dark"] .yo-field.is-bad .yo-input { background: rgba(229, 72, 77, .12); }
.yo-err { color: #c0392b; font-size: .8rem; font-weight: 700; }
select.yo-input { appearance: none; padding-inline-end: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2367776b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; background-size: 18px; }

.yo-input--big { min-height: 58px; font-size: 1.25rem; font-weight: 800; letter-spacing: .08em; text-align: center; }
.yo-input--code { min-height: 64px; font-size: 1.8rem; font-weight: 900; letter-spacing: .6em; text-align: center; padding-inline-start: calc(14px + .6em); }

.yo-btn { min-height: 54px; padding: 0 22px; border: 0; border-radius: 16px; background: linear-gradient(135deg, var(--yh-green-2, #2c6a3d), var(--yh-green, #1f4a2c)); color: #fff; font: inherit; font-weight: 900; font-size: 1rem; cursor: pointer; box-shadow: 0 16px 26px -16px var(--yh-green, #1f4a2c); transition: transform .2s, filter .2s; }
.yo-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.07); }
.yo-btn:disabled { opacity: .65; cursor: progress; }

.yo-resend { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: var(--yp-muted); font-size: .84rem; }
.yo-link { padding: 6px 4px; border: 0; background: none; color: var(--yh-green-2, #2c6a3d); font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- order summary ---------- */
.yo-summary { padding: 20px; border-radius: 22px; background: var(--yd-box, linear-gradient(180deg, #fff, #fffcf6)); box-shadow: var(--yd-shadow, 0 0 0 1px #efe4cd); }
@media (min-width: 992px) { .yo-summary { position: sticky; top: calc(var(--yd-top, 130px) + 16px); } }
.yo-summary h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; font-size: 1.05rem; font-weight: 900; color: var(--yp-text); }
.yo-summary h2 small { padding: 2px 12px; border-radius: 999px; background: #eef5e6; color: var(--yh-green-2, #2c6a3d); font-size: .76rem; font-weight: 800; }
:root[data-theme="dark"] .yo-summary h2 small { background: rgba(124, 196, 143, .16); color: #a8e3b6; }

.yo-items { display: grid; gap: 10px; max-height: 280px; margin: 0 0 12px; padding: 0 0 12px; overflow-y: auto; list-style: none; border-bottom: 1px dashed var(--yd-edge, #e8dcc0); }
.yo-items li { display: flex; align-items: center; gap: 10px; }
.yo-items img { width: 52px; height: 52px; flex: none; border-radius: 12px; object-fit: cover; background: var(--yd-soft, #f3ecdb); }
.yo-items li > span { display: grid; flex: 1; min-width: 0; line-height: 1.6; }
.yo-items b { color: var(--yp-text); font-size: .86rem; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yo-items small { color: var(--yp-muted); font-size: .74rem; }
.yo-items strong { color: var(--yp-text); font-size: .85rem; white-space: nowrap; }

.yo-summary dl { margin: 0; }
.yo-summary dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .9rem; }
.yo-summary dt { color: var(--yp-muted); font-weight: 600; }
.yo-summary dd { margin: 0; color: var(--yp-text); font-weight: 800; white-space: nowrap; }
.yo-summary .yc-summary__total { margin-top: 8px; }
.yo-summary .yc-checkout { width: 100%; border: 0; font: inherit; cursor: pointer; font-weight: 900; }
.yo-summary .yc-checkout:disabled { opacity: .7; cursor: progress; }

/* phone: the pay button stays at the bottom, the one in the summary is hidden */
@media (max-width: 991.98px) {
    .yo-summary .yc-checkout { display: none; }
    .yo-summary { order: 2; }
    .yc-bar button.yc-checkout { border: 0; font: inherit; cursor: pointer; }
}

/* ---------- dropdown lists (the open list of a select) ---------- */
.yo-input, .yo-input option, .yo-input optgroup { font-family: inherit; }
.yo-input option { padding: 10px 12px; background: var(--yp-surface, #fff); color: var(--yp-text, #1d2b22); font-size: 15px; line-height: 2; }
.yo-input option:checked { background: var(--yh-green-2, #2c6a3d); color: #fff; }
:root[data-theme="dark"] .yo-input { color-scheme: dark; }
:root[data-theme="dark"] .yo-input option { background: #141e18; color: #eef5f0; }
