/* ============================================================
   Kura Sushi — Checkout Page Styles
   ============================================================ */

/* Back button always visible on checkout */
.cart-header__back--visible {
    display: flex !important;
}

.checkout-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}

.checkout-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ── Sections ─────────────────────────────────────────── */
.checkout-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.checkout-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkout-section__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.checkout-section__header .checkout-section__title {
    margin-bottom: 0;
}

.checkout-edit-btn {
    font-size: 14px;
    font-weight: 600;
    color: #212121;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
}

/* ── Order Items ──────────────────────────────────────── */
.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-item__img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f5f5f5;
}

.checkout-item__info {
    flex: 1;
    min-width: 0;
}

.checkout-item__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.checkout-item__qty {
    font-size: 12px;
    color: #888;
}

.checkout-item__price {
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ── Delivery Info ────────────────────────────────────── */
.checkout-delivery {
    margin-top: 12px;
}

.checkout-delivery__address {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.checkout-delivery__address svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.checkout-delivery__time {
    font-size: 13px;
    color: #666;
    padding-left: 26px;
}

.checkout-delivery__missing {
    font-size: 14px;
    color: #ed1c24;
    font-weight: 500;
}

/* ── Contact Form ─────────────────────────────────────── */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #212121;
}

.checkout-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    background: #fff;
}
.checkout-field input:focus {
    border-color: #212121;
}
.checkout-field input.is-error {
    border-color: #ed1c24;
}

/* ── Tip Options ──────────────────────────────────────── */
.tip-options {
    display: flex;
    gap: 8px;
}

.tip-btn {
    flex: 1;
    padding: 10px 4px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    background: #fff;
    color: #212121;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tip-btn.is-active {
    background: #212121;
    color: #fff;
    border-color: #212121;
}

.tip-custom-wrap {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 4px;
}

.tip-custom-prefix {
    font-size: 16px;
    font-weight: 600;
    color: #212121;
}

.tip-custom-input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.tip-custom-input:focus {
    border-color: #212121;
}

/* ── Order Summary ────────────────────────────────────── */
.checkout-summary {
    background: #fff;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 6px 0;
    color: #555;
}

.summary-row--total {
    font-size: 18px;
    font-weight: 700;
    color: #212121;
    border-top: 1.5px solid #eee;
    margin-top: 8px;
    padding-top: 12px;
}

/* ── Place Order ──────────────────────────────────────── */
.checkout-place-order {
    margin-top: 16px;
    width: 100%;
    padding: 16px;
    font-size: 17px;
}
.checkout-place-order:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Responsive ───────────────────────────────────────── */
@media (min-width: 768px) {
    .checkout-wrap { padding: 24px 24px 48px; }
}

@media (min-width: 1024px) {
    .checkout-place-order:hover:not(:disabled) { background: #333; }
    .tip-btn:hover:not(.is-active) { background: #f8f8f8; }
    .checkout-edit-btn:hover { color: #555; }
}
