/* Instant product configurator. Theme colors come from admin > settings > theme. */
.rp-modal { --rp-accent: var(--primary-color); --rp-action: var(--primary-color-dark, var(--primary-color)); --rp-ink: #20252b; --rp-muted: #767c85; --rp-line: #e9ebee; color: var(--rp-ink); }
.rp-modal [hidden] { display: none !important; }
.rp-modal .modal-dialog { width: calc(100% - 40px); max-width: 620px; min-height: calc(100% - 48px); margin: 24px auto; padding: 0; }
.rp-modal .rp-dialog { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); overflow: hidden; border: 1px solid #ffffff70; border-radius: 20px; background: #fff; box-shadow: 0 22px 80px #17213030; }
.rp-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 24px 14px; flex-shrink: 0; }
.rp-header h2 { margin: 0; color: var(--rp-ink); font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.rp-close { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; height: 34px; width: 34px; border-radius: 50%; background: #f4f5f7; color: #5d646e; font-size: 15px; cursor: pointer; }
.rp-close:hover { background: rgba(var(--primary-color-rgb), .1); color: var(--rp-action); }
.rp-body { padding: 4px 24px 24px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d5d9df transparent; }
.rp-summary { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.rp-photo { width: 144px; height: 144px; flex-shrink: 0; object-fit: cover; border: 1px solid var(--rp-line); border-radius: 14px; background: #f8f9fa; }
.rp-summary-text { min-width: 0; padding-top: 4px; }
.rp-eyebrow { display: block; margin-bottom: 8px; color: var(--rp-muted); font-size: 8px; font-weight: 700; letter-spacing: 1.4px; }
.rp-summary h3 { margin: 0 0 8px; color: var(--rp-ink); font-size: 23px; line-height: 1.3; font-weight: 750; letter-spacing: -.6px; }
.rp-summary p { margin: 0; color: #6f7580; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.rp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 12px; }
.rp-price del { color: #969ca5; font-size: 12px; }
.rp-price strong { font-size: 18px; font-weight: 750; color: var(--rp-ink); letter-spacing: -.4px; }
.rp-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rp-line); }
.rp-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; color: var(--rp-ink); font-size: 14px; line-height: 1.6; font-weight: 700; }
.rp-section-title small { color: var(--rp-muted); font-size: 10px; font-weight: 400; white-space: nowrap; }
.rp-section-title i { margin-right: 5px; color: var(--rp-accent); font-size: 13px; }
.rp-section-description { margin: -3px 0 12px; color: var(--rp-muted); font-size: 11px; line-height: 1.7; }
.rp-choice-list { display: flex; flex-direction: column; gap: 7px; }
.rp-choice { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid #e2e5e9; border-radius: 9px; cursor: pointer; }
.rp-choice-name { flex: 1; min-width: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.rp-choice-price { flex-shrink: 0; font-size: 12px; font-weight: 650; }
.rp-modal input[type="checkbox"], .rp-modal input[type="radio"] { width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--rp-accent); cursor: pointer; }
.rp-choice:has(input:checked), .rp-recommendation:has(input:checked) { border-color: rgba(var(--primary-color-rgb), .5); background: rgba(var(--primary-color-rgb), .04); }
.rp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-chip { display: inline-flex; cursor: pointer; }
.rp-chip input { position: absolute; opacity: 0; width: 1px !important; height: 1px !important; }
.rp-chip span { display: block; border: 1px solid #dfe3e8; border-radius: 8px; padding: 9px 12px; font-size: 11px; line-height: 1.5; }
.rp-chip input:checked + span { border-color: rgba(var(--primary-color-rgb), .5); background: rgba(var(--primary-color-rgb), .08); color: var(--rp-action); }
.rp-chip input:checked + span::before { content: '✓'; margin-right: 5px; }
.rp-chip input:focus-visible + span { outline: 2px solid var(--rp-accent); outline-offset: 3px; }
.rp-extra-group { border: 1px solid #e2e5e9; border-radius: 10px; overflow: hidden; }
.rp-extra-group summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; padding: 12px 14px; color: #686f79; font-size: 12px; cursor: pointer; }
.rp-extra-group summary::-webkit-details-marker { display: none; }
.rp-extra-group summary::after { content: '⌄'; color: var(--rp-ink); font-size: 18px; line-height: 1; }
.rp-extra-group[open] summary::after { transform: rotate(180deg); }
.rp-extra-group .rp-choice-list { padding: 0 10px 10px; }
.rp-extra-group .rp-choice { border: 0; background: #f8f9fa; }
.rp-allergens { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: #f6f7f9; }
.rp-allergens h3 { font-size: 11px; font-weight: 650; margin: 0 0 5px; }
.rp-allergens p { margin: 0; font-size: 11px; line-height: 1.7; }
.rp-allergens small { font-size: 10px; color: var(--rp-muted); }
.rp-recommendations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rp-recommendation { display: flex; align-items: center; gap: 10px; min-height: 74px; padding: 9px; border: 1px solid #e2e5e9; border-radius: 11px; cursor: pointer; }
.rp-recommendation img { width: 48px; height: 48px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: #f8f9fa; }
.rp-recommendation > span { flex: 1; min-width: 0; }
.rp-recommendation strong { display: block; color: var(--rp-ink); font-size: 11px; line-height: 1.5; font-weight: 600; }
.rp-recommendation small { display: block; margin-top: 4px; color: #626a75; font-size: 11px; font-weight: 650; }
.rp-notes textarea { display: block; width: 100%; padding: 11px 12px; min-height: 68px; max-height: 160px; resize: vertical; border: 1px solid #e2e5e9; border-radius: 9px; background: #fafbfc; color: var(--rp-ink); font-size: 12px; line-height: 1.6; }
.rp-notes textarea::placeholder { color: #969ca5; font-size: 11px; }
.rp-footer { display: grid; grid-template-columns: 108px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px 24px; border-top: 1px solid var(--rp-line); background: #fff; flex-shrink: 0; box-shadow: 0 -4px 20px #20252b04; }
.rp-quantity { display: flex; align-items: center; height: 42px; border: 1px solid #e0e3e8; border-radius: 10px; overflow: hidden; }
.rp-quantity button { width: 32px; height: 100%; flex-shrink: 0; background: #f8f9fa; color: var(--rp-ink); font-size: 11px; cursor: pointer; }
.rp-quantity input { width: 42px; min-width: 0; height: 100%; padding: 0; border: 0; background: #fff; color: var(--rp-ink); font-size: 14px; font-weight: 650; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.rp-quantity input::-webkit-inner-spin-button, .rp-quantity input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.rp-total span { display: block; color: var(--rp-muted); font-size: 10px; line-height: 1.6; }
.rp-total strong { display: block; font-size: 17px; line-height: 1.5; font-weight: 750; color: var(--rp-ink); white-space: nowrap; }
.rp-submit { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 12px 22px; border-radius: 999px; background: var(--rp-action); color: var(--white, #fff); font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.rp-submit:hover { background: var(--rp-accent); }
.rp-submit[aria-busy="true"] { opacity: .75; cursor: progress; }
.rp-submit[aria-busy="true"] i { display: none; }
.rp-submit[aria-busy="true"]::before { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rp-spin .65s linear infinite; }
.rp-modal button:disabled { cursor: default; opacity: .4; }
.rp-modal.is-submitting .rp-submit:disabled { opacity: .75; }
.rp-modal.is-submitting .rp-body { pointer-events: none; }
.rp-modal :is(button,input,textarea):focus-visible { outline: 2px solid var(--rp-accent); outline-offset: 3px; }
.rp-error { margin-top: 18px; padding: 12px; border-radius: 9px; color: #a32e27; background: #fff1ef; font-size: 12px; line-height: 1.7; }
.rp-error p { margin: 0; }
.rp-error button { margin-top: 10px; padding: 8px 12px; border-radius: 7px; color: var(--white, #fff); background: var(--rp-action); font-weight: 600; cursor: pointer; }
@keyframes rp-spin { to { transform: rotate(360deg); } }
@media (max-width: 575px) {
    .rp-modal .modal-dialog { width: calc(100% - 24px); margin: 12px auto; min-height: calc(100% - 24px); }
    .rp-modal .rp-dialog { max-height: calc(100dvh - 24px); border-radius: 16px; }
    .rp-header { padding: 16px 16px 12px; }
    .rp-header h2 { font-size: 16px; }
    .rp-body { padding: 2px 16px 20px; }
    .rp-summary { gap: 14px; margin-bottom: 20px; }
    .rp-photo { width: 100px; height: 108px; border-radius: 10px; }
    .rp-summary-text { padding-top: 0; }
    .rp-eyebrow { display: none; }
    .rp-summary h3 { font-size: 18px; letter-spacing: -.4px; }
    .rp-summary p { font-size: 11px; line-height: 1.6; }
    .rp-price { margin-top: 9px; gap: 6px; }
    .rp-price strong { font-size: 16px; }
    .rp-price del { font-size: 10px; }
    .rp-recommendations { grid-template-columns: 1fr; }
    .rp-section { margin-top: 16px; padding-top: 16px; }
    .rp-footer { grid-template-columns: 108px minmax(0, 1fr); gap: 10px 16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
    .rp-total { text-align: right; }
    .rp-submit { grid-column: 1 / -1; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .rp-submit[aria-busy="true"]::before { animation: none; } }
