/* ══════════════════════════════════════════
   SEOFAI Commerce — Update Landing + Edit Form
   ══════════════════════════════════════════ */

/* ── Update Landing Hero ── */
.sfc-update-hero{text-align:center;padding:40px 0 32px}
.sfc-update-hero__icon{width:72px;height:72px;margin:0 auto 16px;border-radius:20px;background:linear-gradient(135deg,#6366f1,#4f46e5);color:#fff;display:flex;align-items:center;justify-content:center}
.sfc-update-hero__title{font-size:28px;font-weight:800;color:#0f172a;margin:0 0 8px}
.sfc-update-hero__subtitle{font-size:15px;color:#64748b;margin:0;max-width:480px;margin:0 auto;line-height:1.6}

/* ── Steps Overview Bar ── */
.sfc-update-steps-overview{display:flex;align-items:center;justify-content:center;gap:12px;padding:20px 24px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:32px;flex-wrap:wrap}
.sfc-update-steps-overview__item{display:flex;align-items:center;gap:10px}
.sfc-update-steps-overview__num{width:28px;height:28px;border-radius:8px;background:var(--sfc-step-number-bg,#4f46e5);color:var(--sfc-step-number-text,#fff);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex-shrink:0}
.sfc-update-steps-overview__text{display:flex;flex-direction:column;gap:1px}
.sfc-update-steps-overview__text strong{font-size:13px;color:#1e293b}
.sfc-update-steps-overview__text span{font-size:12px;color:#64748b}
.sfc-update-steps-overview__arrow{color:#cbd5e1}

/* ── Search ── */
.sfc-update-search-wrap{position:relative}
.sfc-update-search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#94a3b8;pointer-events:none}
.sfc-update-search-wrap .sfc-input{padding-left:42px;padding-right:42px}
.sfc-update-search-spinner{position:absolute;right:14px;top:50%;transform:translateY(-50%);color:#6366f1;animation:sfcSpin 1s linear infinite}
@keyframes sfcSpin{from{transform:translateY(-50%) rotate(0deg)}to{transform:translateY(-50%) rotate(360deg)}}

/* ── Search Results ── */
.sfc-update-results{border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;margin-top:8px;max-height:360px;overflow-y:auto}
.sfc-update-result{display:flex;align-items:center;gap:12px;padding:12px 16px;border:none;background:#fff;width:100%;text-align:left;cursor:pointer;border-bottom:1px solid #f1f5f9;transition:background .15s;font-family:inherit}
.sfc-update-result:last-child{border-bottom:none}
.sfc-update-result:hover{background:#f8fafc}
.sfc-update-result__logo{width:40px;height:40px;border-radius:10px;object-fit:cover;flex-shrink:0;background:#f1f5f9}
.sfc-update-result__logo--placeholder{display:flex;align-items:center;justify-content:center}
.sfc-update-result__info{flex:1;min-width:0}
.sfc-update-result__info strong{display:block;font-size:14px;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sfc-update-result__info span{display:block;font-size:12px;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sfc-update-result__arrow{color:#cbd5e1;flex-shrink:0}
.sfc-update-no-results{text-align:center;padding:24px;color:#64748b;font-size:14px;background:#f8fafc;border-radius:12px;border:1px dashed #e2e8f0}
.sfc-update-no-results p{margin:0}

/* ── Selected Listing ── */
.sfc-update-selected__card{display:flex;align-items:center;gap:14px;padding:16px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px}
.sfc-update-selected__logo{width:48px;height:48px;border-radius:12px;object-fit:cover;flex-shrink:0}
.sfc-update-selected__info{flex:1;min-width:0}
.sfc-update-selected__info strong{display:block;font-size:15px;color:#1e293b}
.sfc-update-selected__url{display:block;font-size:12px;color:#94a3b8;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sfc-update-selected__change{padding:6px 14px;font-size:13px;font-weight:600;color:#6366f1;background:#eef2ff;border:none;border-radius:8px;cursor:pointer;transition:background .15s}
.sfc-update-selected__change:hover{background:#e0e7ff}

/* ── Price Info ── */
.sfc-update-price-info{margin-top:20px;padding:16px;background:#fafbff;border:1px solid #e0e7ff;border-radius:12px}
.sfc-update-price-info__row{display:flex;justify-content:space-between;align-items:center;font-size:15px;color:#1e293b}
.sfc-update-price-info__row strong{font-size:18px;color:#4f46e5}
.sfc-update-price-info__note{margin:8px 0 0;font-size:12px;color:#94a3b8}

/* ── What You Can Edit Card ── */
.sfc-update-info-card{margin-top:32px;padding:24px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px}
.sfc-update-info-card h3{margin:0 0 16px;font-size:16px;font-weight:700;color:#1e293b}
.sfc-update-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sfc-update-info-item{display:flex;align-items:center;gap:8px;font-size:14px;color:#475569}

/* ══════════════════════════════════════════
   Edit Listing Form
   ══════════════════════════════════════════ */

/* ── Traffic Card ── */
.sfc-edit-traffic{display:flex;align-items:center;gap:14px;padding:16px;background:linear-gradient(135deg,#eef2ff,#f5f3ff);border:1px solid #e0e7ff;border-radius:12px;margin-bottom:24px}
.sfc-edit-traffic__icon{width:40px;height:40px;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.sfc-edit-traffic__data{display:flex;flex-direction:column;gap:2px}
.sfc-edit-traffic__data strong{font-size:15px;color:#1e293b}
.sfc-edit-traffic__data span{font-size:13px;color:#6366f1}

/* ── Edit Sections ── */
.sfc-edit-section{margin-bottom:28px;padding-top:20px;border-top:1px solid #f1f5f9}

/* ── Image Fields ── */
.sfc-edit-images{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.sfc-edit-image-field{display:flex;flex-direction:column;gap:8px}
.sfc-edit-image-preview{width:100%;height:120px;border-radius:12px;border:1px dashed #e2e8f0;background:#fafafa;display:flex;align-items:center;justify-content:center;overflow:hidden}
.sfc-edit-image-preview--wide{height:140px}
.sfc-edit-image-preview img{width:100%;height:100%;object-fit:contain}
.sfc-edit-image-placeholder{color:#94a3b8;font-size:13px}
.sfc-edit-image-actions{display:flex;gap:8px}

/* ── Repeater Fields ── */
.sfc-edit-repeater{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.sfc-edit-repeater__item{display:flex;gap:8px;align-items:flex-start;padding:12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px}
.sfc-edit-repeater__fields{flex:1;display:flex;flex-direction:column;gap:8px}
.sfc-edit-repeater__remove{flex-shrink:0;width:32px;height:32px;border:none;background:transparent;color:#94a3b8;cursor:pointer;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:all .15s}
.sfc-edit-repeater__remove:hover{background:#fef2f2;color:#ef4444}

/* Tier fields: 2-column grid */
.sfc-edit-tier-fields{display:grid !important;grid-template-columns:1fr 1fr;gap:8px}

/* FAQ fields: stack */
.sfc-edit-faq-fields .sfc-textarea{min-height:60px}

/* ── Preview Toggle ── */
.sfc-edit-preview-toggle{text-align:center;margin:24px 0 8px}

/* ── Preview Panel ── */
.sfc-edit-preview{margin:16px 0;border:1px solid #e2e8f0;border-radius:14px;overflow:hidden;background:#fff}
.sfc-edit-preview__header{display:flex;justify-content:space-between;align-items:center;padding:14px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.sfc-edit-preview__header strong{font-size:15px;color:#1e293b}
.sfc-edit-preview__close{width:28px;height:28px;border:none;background:transparent;color:#94a3b8;cursor:pointer;border-radius:6px;display:flex;align-items:center;justify-content:center}
.sfc-edit-preview__close:hover{background:#f1f5f9;color:#1e293b}
.sfc-edit-preview__content{padding:16px 20px}

/* ── Preview Diff Rows ── */
.sfc-preview-row{padding:14px 0;border-bottom:1px solid #f1f5f9}
.sfc-preview-row:last-child{border-bottom:none}
.sfc-preview-row > strong{display:block;font-size:13px;color:#6366f1;text-transform:uppercase;letter-spacing:.5px;margin-bottom:10px}
.sfc-preview-diff{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.sfc-preview-old,.sfc-preview-new{padding:10px 12px;border-radius:8px;font-size:13px;line-height:1.5}
.sfc-preview-old{background:#fef2f2;border:1px solid #fecaca;color:#991b1b}
.sfc-preview-new{background:#f0fdf4;border:1px solid #bbf7d0;color:#166534}
.sfc-preview-label{display:block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px;opacity:.7}
.sfc-preview-old .sfc-preview-label{color:#dc2626}
.sfc-preview-new .sfc-preview-label{color:#16a34a}
.sfc-preview-diff ul{list-style:none;padding:0;margin:0}
.sfc-preview-diff li{padding:3px 0;font-size:12px}
.sfc-preview-diff img{border-radius:6px;background:#f1f5f9}

/* ── Edit Success ── */
.sfc-edit-success{text-align:center;padding:40px 20px}
.sfc-edit-success h3{font-size:22px;font-weight:700;color:#1e293b;margin:16px 0 8px}
.sfc-edit-success p{font-size:15px;color:#64748b;margin:0}

/* ── Textarea ── */
.sfc-textarea{resize:vertical;min-height:100px;font-family:inherit}

/* ── Select ── */
.sfc-select{appearance:auto}

/* ── Small Button ── */
.sfc-btn--sm{padding:6px 14px !important;font-size:13px !important}
.sfc-btn--lg{padding:14px 28px !important;font-size:15px !important}
.sfc-btn--outline{background:#fff !important;color:#4f46e5 !important;border:1.5px solid #e0e7ff !important}
.sfc-btn--outline:hover{background:#eef2ff !important;border-color:#c7d2fe !important}
.sfc-btn--loading{opacity:.6;pointer-events:none}

/* ── Columns ── */
.sfc-edit-listing .sfc-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px}

/* ── Responsive ── */
@media(max-width:640px){
    .sfc-update-steps-overview__arrow{display:none}
    .sfc-update-steps-overview{flex-direction:column;gap:8px}
    .sfc-update-info-grid{grid-template-columns:1fr}
    .sfc-edit-images{grid-template-columns:1fr}
    .sfc-edit-tier-fields{grid-template-columns:1fr !important}
    .sfc-preview-diff{grid-template-columns:1fr}
    .sfc-edit-listing .sfc-cols{grid-template-columns:1fr}
    .sfc-update-hero__title{font-size:22px}
}
