/* ==========================================================================
   Delivery page (marketplace/host-pages/delivery.js). Tokens from theme.css;
   .ia-h2 / .ia-sec__lead are shared with home.css.
   ========================================================================== */

.ia-deliv { max-width: 1040px; }
.ia-deliv__lead { margin-top: 12px; max-width: 54ch; font-size: 1.0625rem; color: var(--mp-fg-muted); }

/* Calculator panel. */
.ia-calc {
    margin-top: var(--mp-space-6); padding: var(--mp-space-5); border-radius: var(--mp-radius-lg);
    background: var(--mp-surface); border: 1px solid var(--mp-border); box-shadow: var(--mp-shadow-card);
}
.ia-calc__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: var(--mp-space-5); }
.ia-calc__qty { display: grid; gap: 6px; }
.ia-calc__qty .mp-label { margin: 0; }
.ia-calc__empty { color: var(--mp-fg-muted); }

/* Method cards: a radio group of big buttons. */
.ia-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ia-method {
    display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: start; padding: 16px; text-align: left;
    border: 1px solid var(--mp-border-strong); border-radius: var(--mp-radius); background: var(--mp-bg-alt); color: var(--mp-fg);
    transition: border-color var(--mp-dur) var(--mp-ease), background-color var(--mp-dur) var(--mp-ease), transform var(--mp-dur-fast) var(--mp-ease);
}
.ia-method:hover { border-color: var(--mp-fg-subtle); }
.ia-method:active { transform: scale(0.98); }
.ia-method.is-selected { border-color: var(--mp-primary); background: var(--mp-primary-soft); box-shadow: 0 0 0 1px var(--mp-primary); }
.ia-method__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--mp-surface-2); color: var(--mp-primary-text); }
.ia-method__ico .mp-i { width: 24px; height: 24px; }
.ia-method.is-selected .ia-method__ico { background: var(--mp-primary); color: var(--mp-primary-fg); }
.ia-method__body { display: grid; gap: 4px; min-width: 0; }
.ia-method__title { font: 600 1.375rem/1.1 var(--mp-font-display); letter-spacing: 0.01em; }
.ia-method__text { font-size: 0.875rem; color: var(--mp-fg-muted); }
.ia-method__eta { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--mp-fg-muted); font-variant-numeric: tabular-nums; }
.ia-method__eta .mp-i { width: 16px; height: 16px; }
.ia-method__price { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--mp-border); }
.ia-method__price strong { font: 700 1.75rem/1 var(--mp-font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ia-method__price small { font-size: 0.8125rem; color: var(--mp-fg-muted); font-variant-numeric: tabular-nums; }

/* Result for the chosen method. */
.ia-result {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
    margin-top: var(--mp-space-4); padding: 20px; border-radius: var(--mp-radius); background: var(--mp-bg-alt); border: 1px dashed var(--mp-border-strong);
}
.ia-result__head { font-weight: 600; color: var(--mp-fg-muted); }
.ia-result__calc { margin-top: 4px; font: 700 clamp(1.75rem, 4vw, 2.5rem)/1.1 var(--mp-font-display); font-variant-numeric: tabular-nums; }
.ia-result__eta { margin-top: 6px; font-variant-numeric: tabular-nums; }
.ia-result__note { margin-top: 6px; font-size: 0.875rem; color: var(--mp-fg-subtle); }
[data-theme="light"] .ia-method, [data-theme="light"] .ia-result { background: #fff; }
[data-theme="light"] .ia-method.is-selected { background: var(--mp-primary-soft); }

/* Delivery conditions: the admin's text as article typography. */
.ia-terms { margin-top: var(--mp-space-7); }
.ia-prose { max-width: 68ch; margin-top: var(--mp-space-4); color: var(--mp-fg-muted); line-height: 1.7; }
.ia-prose > * + * { margin-top: 14px; }
.ia-prose h1, .ia-prose h2, .ia-prose h3, .ia-prose h4 { margin-top: 28px; color: var(--mp-fg); font-size: 1.625rem; line-height: 1.1; }
.ia-prose strong { color: var(--mp-fg); font-weight: 600; }
.ia-prose a { text-decoration: underline; text-underline-offset: 3px; }
.ia-prose ul, .ia-prose ol { padding-left: 1.25em; }
.ia-prose ul { list-style: disc; }
.ia-prose ol { list-style: decimal; }
.ia-prose li + li { margin-top: 6px; }
.ia-prose li::marker { color: var(--mp-primary-text); }

@media (max-width: 520px) {
    .ia-calc { padding: 16px; }
    .ia-methods { grid-template-columns: 1fr; }
    .ia-result { padding: 16px; }
    .ia-result .mp-btn { width: 100%; }
}
