/* ── Order detail modal ── */

/* Lightbox */
.od-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.od-lightbox-img { max-width: 80vw; max-height: 85vh; object-fit: contain; border-radius: .5rem; box-shadow: 0 25px 50px rgba(0,0,0,.5); cursor: default; }
.od-lb-enter { transition: opacity .15s ease; }
.od-lb-hidden { opacity: 0; }
.od-lb-visible { opacity: 1; }
.od-product-thumb-clickable { cursor: zoom-in; transition: opacity .15s; }
.od-product-thumb-clickable:hover { opacity: .8; }
.od-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 3rem; line-height: 1; width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; z-index: 1; }
.od-lb-nav:hover { background: rgba(255,255,255,.3); }
.od-lb-prev { left: 1.25rem; }
.od-lb-next { right: 1.25rem; }
.od-lb-counter { position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8); font-size: .8rem; background: rgba(0,0,0,.4); padding: .2rem .6rem; border-radius: 9999px; pointer-events: none; }

.od-root { font-size: .875rem; line-height: 1.25rem; }
.od-root > * + * { border-top: 1px solid #e5e7eb; }
.dark .od-root > * + * { border-color: rgba(255,255,255,.1); }

/* Header */
.od-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.5rem; }
.od-header-left { display: flex; align-items: center; gap: .75rem; }
.od-title { font-size: 1rem; font-weight: 600; color: #111827; }
.dark .od-title { color: #fff; }
.od-meta { display: flex; align-items: center; gap: 1rem; font-size: .75rem; color: #6b7280; }
.dark .od-meta { color: #9ca3af; }
.od-meta a { color: var(--color-primary-600, #d97706); text-decoration: none; display:flex; align-items:center; gap:.25rem; }
.od-meta a:hover { color: var(--color-primary-500, #f59e0b); }
.od-meta-icon { display:flex; align-items:center; gap:.25rem; }

/* Status badge */
.od-badge { display: inline-flex; align-items: center; border-radius: 9999px; padding: .2rem .625rem; font-size: .75rem; font-weight: 500; }
.od-badge-paid     { background:#f0fdf4; color:#15803d; box-shadow:inset 0 0 0 1px #bbf7d0; }
.od-badge-pending  { background:#fefce8; color:#a16207; box-shadow:inset 0 0 0 1px #fde68a; }
.od-badge-cancelled{ background:#fef2f2; color:#b91c1c; box-shadow:inset 0 0 0 1px #fecaca; }
.od-badge-shipped  { background:#eff6ff; color:#1d4ed8; box-shadow:inset 0 0 0 1px #bfdbfe; }
.od-badge-default  { background:#f9fafb; color:#4b5563; box-shadow:inset 0 0 0 1px #e5e7eb; }
.dark .od-badge-paid     { background:rgba(74,222,128,.1); color:#4ade80; box-shadow:inset 0 0 0 1px rgba(74,222,128,.2); }
.dark .od-badge-pending  { background:rgba(250,204,21,.1); color:#fbbf24; box-shadow:inset 0 0 0 1px rgba(250,204,21,.2); }
.dark .od-badge-cancelled{ background:rgba(248,113,113,.1); color:#f87171; box-shadow:inset 0 0 0 1px rgba(248,113,113,.2); }
.dark .od-badge-shipped  { background:rgba(96,165,250,.1); color:#60a5fa; box-shadow:inset 0 0 0 1px rgba(96,165,250,.2); }
.dark .od-badge-default  { background:rgba(255,255,255,.05); color:#9ca3af; box-shadow:inset 0 0 0 1px rgba(255,255,255,.1); }

/* Two-column customer/address panel */
.od-customer-grid { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 639px) { .od-customer-grid { grid-template-columns: 1fr; } }
.od-panel { padding: 1rem 1.5rem; }
.od-panel + .od-panel { border-left: 1px solid #e5e7eb; }
@media (max-width: 639px) { .od-panel + .od-panel { border-left: none; border-top: 1px solid #e5e7eb; } }
.dark .od-panel + .od-panel { border-color: rgba(255,255,255,.1); }
.dark .od-customer-grid { border-color: rgba(255,255,255,.1); }
.od-section-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af; margin-bottom: .5rem; }
.od-customer-name { font-weight: 500; color: #111827; }
.dark .od-customer-name { color: #fff; }
.od-customer-meta { display: flex; align-items: center; gap: .375rem; color: #6b7280; margin-top: .25rem; }
.dark .od-customer-meta { color: #9ca3af; }
.od-address-line { color: #374151; }
.dark .od-address-line { color: #d1d5db; }
.od-shipping-method { display:flex; align-items:center; gap:.375rem; margin-top:.5rem; color:#6b7280; }
.dark .od-shipping-method { color:#9ca3af; }

/* Products section */
.od-products { padding: 1rem 1.5rem; }
.od-product-list { display: flex; flex-direction: column; gap: .75rem; margin-top: .75rem; }
.od-product-row { display: flex; gap: .75rem; align-items: flex-start; }
.od-product-thumb { flex-shrink: 0; width: 4rem; height: 4rem; border-radius: .5rem; overflow: hidden; background: #f3f4f6; display:flex; align-items:center; justify-content:center; }
.dark .od-product-thumb { background: rgba(255,255,255,.05); }
.od-product-thumb img { width:100%; height:100%; object-fit:cover; }
.od-product-thumb svg { width:1.5rem; height:1.5rem; color:#d1d5db; }
.dark .od-product-thumb svg { color:#4b5563; }
.od-product-info { flex: 1; min-width: 0; }
.od-product-name { font-weight: 500; color: #111827; line-height: 1.375; }
.dark .od-product-name { color: #fff; }
.od-product-link { color: var(--color-primary-600, #d97706); text-decoration: none; }
.od-product-link:hover { text-decoration: underline; }
.od-product-sub { font-size: .75rem; color: #6b7280; }
.dark .od-product-sub { color: #9ca3af; }
.od-product-pricing { flex-shrink: 0; text-align: right; }
.od-product-price { font-weight: 500; color: #111827; }
.dark .od-product-price { color: #fff; }
.od-product-qty { font-size: .75rem; color: #6b7280; }
.dark .od-product-qty { color: #9ca3af; }
.od-product-line-total { font-size: .75rem; font-weight: 500; color: #374151; }
.dark .od-product-line-total { color: #d1d5db; }

/* Summary */
.od-summary { padding: 1rem 1.5rem; }
.od-summary-inner { margin-left: auto; max-width: 18rem; }
.od-summary-row { display: flex; justify-content: space-between; padding: .25rem 0; color: #6b7280; }
.dark .od-summary-row { color: #9ca3af; }
.od-summary-discount { color: #16a34a; }
.dark .od-summary-discount { color: #4ade80; }
.od-summary-discount-icon { display:inline-flex; align-items:center; gap:.25rem; }
.od-summary-total { display: flex; justify-content: space-between; padding: .5rem 0 .25rem; margin-top: .5rem; border-top: 1px solid #e5e7eb; font-weight: 600; color: #111827; }
.dark .od-summary-total { border-color: rgba(255,255,255,.1); color: #fff; }

/* Comments */
.od-comments { padding: 1rem 1.5rem; }
.od-comments p { color: #374151; white-space: pre-line; }
.dark .od-comments p { color: #d1d5db; }

/* Shared icon sizing inside od- */
.od-icon { width: .875rem; height: .875rem; flex-shrink: 0; display: inline-block; vertical-align: middle; }

/* Ensure clear buttons appear rightmost in suffix actions */
.fi-fo-text-input .fi-input-wrp-suffix { display: flex; align-items: center; flex-wrap: nowrap; }

/* Repeater image gallery – clickable */
.fi-fo-repeater-item img.fi-sc-image { cursor: zoom-in; transition: opacity .15s; }
.fi-fo-repeater-item img.fi-sc-image:hover { opacity: .8; }
