/* B2B Order Sheets — Frontend ──────────────────────────────────────────── */
:root {
  --bos-primary:    #623d35;
  --bos-primary-dk: #4a2e28;
  --bos-accent:     #f5ede8;
  --bos-ok:         #2d7a2d;
  --bos-error:      #a00000;
  --bos-warn:       #cc6600;
  --bos-border:     #ddd;
  --bos-row-alt:    #f9f5f3;
  --bos-radius:     8px;
  --bos-shadow:     0 2px 12px rgba(0,0,0,.08);
}

/* ── Outer wrap ────────────────────────────────────────────────────────── */
.bos-upload { max-width:860px; margin:0 auto; font-size:15px; }

/* ── Guided flow (bos_b2b shortcode) ───────────────────────────────────── */
.bos-guide {
  width:100%; padding:0 0 32px;
}
.bos-guide__step {
  background:#fdfaf9; border:1px solid #e0d4d0;
  border-top:4px solid var(--bos-primary); border-radius:12px;
  padding:24px 32px 24px; box-shadow:0 2px 20px rgba(98,61,53,.09);
}
.bos-guide__step-head {
  display:flex !important; align-items:center !important; gap:14px !important;
  margin-bottom:0 !important; flex-direction:column !important;
  padding-bottom:20px !important; border-bottom:1px solid #ede4e0 !important;
  text-align:center !important;
}
.bos-guide__num {
  display:flex !important; align-items:center !important; justify-content:center !important;
  width:52px !important; height:52px !important; min-width:52px !important;
  border-radius:50% !important; background:var(--bos-primary) !important;
  color:#fff !important; font-size:24px !important; font-weight:700 !important;
  line-height:1 !important; flex-shrink:0 !important; margin:0 !important; padding:0 !important;
  box-shadow:0 4px 12px rgba(98,61,53,.28) !important;
}
.bos-guide__title {
  margin:0 0 8px !important; font-size:21px !important; font-weight:700 !important;
  color:var(--bos-primary) !important; line-height:1.2 !important;
  text-align:center !important;
}
.bos-guide__desc {
  margin:0 auto !important; font-size:15px !important; color:#555 !important;
  line-height:1.7 !important; text-align:center !important; max-width:600px !important;
}
.bos-guide__arrow {
  text-align:center; padding:12px 0; color:var(--bos-primary); opacity:.6;
}
.bos-guide__arrow svg { width:32px; height:32px; }

.bos-login-notice {
  max-width:680px; margin:0 auto; padding:16px 20px; text-align:center;
  background:#fff9f5; border:1px solid var(--bos-border);
  border-radius:var(--bos-radius); color:var(--bos-primary); font-size:15px;
}

/* Inner layout for guide step content — below the separator line */
.bos-guide__step .bos-download-buttons {
  margin-top:18px !important; margin-bottom:0 !important; margin-left:auto !important; margin-right:auto !important;
  justify-content:center !important; flex-direction:row !important;
  flex-wrap:wrap !important; gap:12px !important; width:fit-content !important;
}
.bos-guide__step .bos-download-buttons a.bos-btn--download {
  width:auto !important; max-width:none !important;
  justify-content:center !important;
  padding:12px 28px !important; font-size:14px !important;
}
.bos-guide__step .bos-upload { max-width:none !important; margin-top:18px !important; }
.bos-guide__step .bos-dropzone { max-width:600px !important; margin:0 auto !important; padding:36px 24px !important; }

/* ── Compact layout (bos_b2b_compact shortcode — footer/banner use) ────── */
/* Two-row centered layout, no card box — downloads on top, upload below */
.bos-compact {
  display:flex !important; flex-direction:column !important;
  align-items:center !important; gap:12px !important;
  padding:0 !important; background:transparent !important;
  border:none !important; box-shadow:none !important;
  text-align:center !important;
}
.bos-compact__download { width:100%; }
.bos-compact__download .bos-download-buttons {
  flex-direction:row !important; justify-content:center !important;
  flex-wrap:wrap !important; gap:10px !important; margin-bottom:0 !important;
  align-items:center !important;
}
.bos-compact__download .bos-download-buttons a.bos-btn--download {
  font-size:14px !important; padding:11px 22px !important;
}
.bos-compact__sep { display:none !important; }
.bos-compact__upload { width:100%; margin-top:8px !important; }
.bos-compact__upload .bos-upload { max-width:none !important; margin:0 !important; font-size:14px !important; }
/* Horizontal pill layout: icon left, text right — wide but short */
.bos-compact__upload .bos-dropzone {
  display:flex !important; flex-direction:row !important;
  align-items:center !important; justify-content:center !important;
  gap:14px !important; padding:14px 24px !important;
  text-align:left !important; background:transparent !important;
}
.bos-compact__upload .bos-dropzone__icon { margin:0 !important; flex-shrink:0 !important; }
.bos-compact__upload .bos-dropzone__icon svg { width:30px !important; height:30px !important; margin:0 !important; }
.bos-compact__upload .bos-dropzone__text { font-size:15px !important; margin:0 !important; }
.bos-compact__upload .bos-dropzone__text span { display:inline !important; font-size:13px !important; margin:0 !important; }
.bos-compact__upload .bos-dropzone__text span::before { content:" — "; }
.bos-compact__upload .bos-dropzone__hint { display:none !important; }
.bos-compact__upload .bos-dropzone:hover,
.bos-compact__upload .bos-dropzone:focus,
.bos-compact__upload .bos-dropzone--over {
  background:rgba(98,61,53,.06) !important;
  border-style:dashed !important;
}
.bos-compact__upload .bos-review { margin-top:12px; }

/* ── Compact upload trigger button ─────────────────────────────────────── */
.bos-compact-trigger {
  display:inline-flex !important; align-items:center !important; gap:8px !important;
  background:#623d35 !important; color:#fff !important;
  padding:9px 16px !important; border-radius:8px !important;
  font-size:13px !important; font-weight:600 !important;
  cursor:pointer !important; border:none !important;
  box-shadow:0 2px 6px rgba(98,61,53,.2) !important;
  transition:background .18s; text-decoration:none !important; line-height:1.3 !important;
}
.bos-compact-trigger:hover, .bos-compact-trigger:focus {
  background:#4a2e28 !important; color:#fff !important;
  outline:2px solid var(--bos-primary) !important; outline-offset:2px !important;
}
.bos-compact-trigger svg {
  flex-shrink:0 !important; stroke:#fff !important; fill:none !important;
}

/* ── Step labels (legacy — used by [bos_download_buttons] + [bos_upload_form] separately) ── */
.bos-step-label {
  display:flex !important; align-items:center !important; gap:9px !important;
  font-size:12px !important; font-weight:700 !important; letter-spacing:.06em !important;
  text-transform:uppercase !important; color:var(--bos-primary) !important;
  margin:0 0 14px !important; padding:0 !important; flex-direction:row !important;
}
.bos-step-num {
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  width:22px !important; height:22px !important; border-radius:50% !important;
  background:var(--bos-primary) !important; color:#fff !important;
  font-size:12px !important; font-weight:700 !important; flex-shrink:0 !important;
  line-height:1 !important; min-width:22px !important;
}

/* ── Download buttons ──────────────────────────────────────────────────── */
.bos-download-buttons {
  display:flex !important; flex-wrap:wrap !important; gap:12px !important;
  margin-bottom:32px !important; align-items:flex-start !important;
  flex-direction:row !important;
}

.bos-download-buttons a.bos-btn--download {
  display:inline-flex !important; flex-direction:row !important;
  align-items:center !important; justify-content:center !important; gap:9px !important;
  background:#623d35 !important; color:#fff !important;
  padding:11px 18px !important; border-radius:8px !important;
  font-size:14px !important; font-weight:600 !important;
  text-decoration:none !important; border:none !important;
  box-shadow:0 2px 8px rgba(98,61,53,.22) !important;
  transition:background .18s, box-shadow .18s, transform .12s;
  line-height:1.4 !important; flex:0 0 auto !important; width:auto !important;
  height:auto !important; min-height:0 !important; max-width:none !important;
  align-self:flex-start !important;
}
.bos-download-buttons a.bos-btn--download svg {
  width:16px !important; height:16px !important; flex-shrink:0 !important;
  stroke:#fff !important; fill:none !important; display:inline !important;
  vertical-align:middle !important;
}
.bos-download-buttons a.bos-btn--download:hover,
.bos-download-buttons a.bos-btn--download:focus {
  background:#4a2e28 !important; color:#fff !important;
  box-shadow:0 4px 16px rgba(98,61,53,.32) !important; transform:translateY(-1px);
  outline:none !important; text-decoration:none !important;
}
.bos-download-buttons a.bos-btn--download:active { transform:translateY(0); }

/* ── Shared button (upload flow) ───────────────────────────────────────── */
.bos-btn {
  display:inline-flex !important; align-items:center; justify-content:center;
  padding:11px 22px; border-radius:var(--bos-radius);
  font-size:15px; font-weight:600; cursor:pointer; text-decoration:none !important;
  border:2px solid transparent;
  transition:background .2s, color .2s, border-color .2s, opacity .2s;
  line-height:1.3;
}
.bos-btn--primary {
  background:var(--bos-primary) !important; color:#fff !important;
  border-color:var(--bos-primary) !important;
}
.bos-btn--primary:hover,
.bos-btn--primary:focus {
  background:var(--bos-primary-dk) !important; border-color:var(--bos-primary-dk) !important;
  color:#fff !important; outline:none;
}
.bos-btn--ghost {
  background:transparent !important; color:var(--bos-primary) !important;
  border-color:var(--bos-primary) !important;
}
.bos-btn--ghost:hover,
.bos-btn--ghost:focus { background:var(--bos-accent) !important; outline:none; }
.bos-btn--large { padding:14px 32px !important; font-size:16px !important; }
.bos-btn--disabled,
.bos-btn:disabled { opacity:.45; cursor:not-allowed; pointer-events:none; }

/* ── Drop zone ─────────────────────────────────────────────────────────── */
.bos-dropzone {
  border:2px dashed var(--bos-primary); border-radius:var(--bos-radius);
  padding:48px 32px; text-align:center; cursor:pointer;
  background:#fff;
  transition:background .15s, border-color .15s, border-style .15s;
  position:relative;
}
.bos-dropzone:hover,
.bos-dropzone:focus,
.bos-dropzone--over {
  background:#ece0da; border-color:var(--bos-primary-dk); border-style:solid; outline:none;
}
.bos-dropzone__icon svg {
  width:52px; height:52px; color:var(--bos-primary); margin-bottom:14px;
  opacity:.85;
}
.bos-dropzone:hover .bos-dropzone__icon svg,
.bos-dropzone--over .bos-dropzone__icon svg { opacity:1; }
.bos-dropzone__text {
  font-size:17px; font-weight:700; color:var(--bos-primary); margin:0 0 6px;
}
.bos-dropzone__text span { font-weight:400; font-size:14px; color:#666; display:block; margin-top:3px; }
.bos-dropzone__hint { font-size:13px; color:#888; margin:0; }

/* ── File queue (multi-file) ───────────────────────────────────────────── */
.bos-file-queue { list-style:none; margin:12px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }

.bos-file-item {
  display:flex; align-items:center; gap:10px;
  background:#fff; border:1px solid var(--bos-border); border-radius:var(--bos-radius);
  padding:10px 14px; font-size:14px;
}
.bos-file-item--ok { border-color:#b2d8b2; background:#f0fff4; }

.bos-file-item__icon { flex-shrink:0; color:var(--bos-primary); line-height:1; }
.bos-file-item__icon svg { width:18px; height:18px; display:block; }
.bos-file-item__icon--ok { color:var(--bos-ok); font-size:16px; font-weight:700; }

.bos-file-item__name { flex:1; font-weight:500; color:#333; word-break:break-word; min-width:0; }

.bos-file-item__badge {
  flex-shrink:0; font-size:12px; color:var(--bos-ok); font-weight:600;
  background:#d4edda; padding:2px 9px; border-radius:20px;
}

.bos-file-item__remove {
  flex-shrink:0; background:none; border:none; cursor:pointer;
  color:#aaa; font-size:17px; line-height:1; padding:2px 5px;
  border-radius:4px; transition:color .15s, background .15s;
}
.bos-file-item__remove:hover { color:var(--bos-error); background:#fff0f0; }

/* ── Action bar ────────────────────────────────────────────────────────── */
.bos-action-bar { display:flex; gap:12px; flex-wrap:wrap; margin-top:16px; }

/* ── Loading ───────────────────────────────────────────────────────────── */
.bos-loading {
  display:flex; align-items:center; gap:14px;
  padding:32px 0; color:var(--bos-primary); font-weight:500;
}
.bos-spinner {
  width:28px; height:28px; border:3px solid var(--bos-accent);
  border-top-color:var(--bos-primary); border-radius:50%;
  animation:bos-spin .7s linear infinite; flex-shrink:0;
}
@keyframes bos-spin { to { transform:rotate(360deg); } }

/* ── Error ─────────────────────────────────────────────────────────────── */
.bos-error {
  background:#fff0f0; border:1px solid #ffc0c0;
  border-left:4px solid var(--bos-error); border-radius:var(--bos-radius);
  padding:14px 18px; color:var(--bos-error); font-weight:500; margin-bottom:16px;
}
.bos-error p { margin:0; }

/* ── Review ────────────────────────────────────────────────────────────── */
.bos-review { margin-top:28px; }
.bos-review__header {
  display:flex; align-items:baseline; gap:20px; flex-wrap:wrap; margin-bottom:16px;
}
.bos-review__header h3 { margin:0; font-size:18px; color:var(--bos-primary); }
.bos-review__summary { font-size:14px; color:#555; }
.bos-summary--warn { color:var(--bos-warn); font-weight:600; }
.bos-review__table-wrap {
  overflow-x:auto; border:1px solid var(--bos-border);
  border-radius:var(--bos-radius); margin-bottom:20px; box-shadow:var(--bos-shadow);
}
.bos-review__table { width:100%; border-collapse:collapse; font-size:14px; background:#fff; }
.bos-review__table th {
  background:var(--bos-primary); color:#fff; padding:10px 14px;
  text-align:left; font-weight:600; white-space:nowrap;
}
.bos-review__table td { padding:9px 14px; border-bottom:1px solid var(--bos-border); vertical-align:middle; }
.bos-review__table tbody tr:nth-child(even) td { background:var(--bos-row-alt); }
.bos-review__table tbody tr:last-child td { border-bottom:none; }
.bos-review__row--invalid td { color:#999; background:#fff8f8 !important; }
.bos-review__total-row td {
  border-top:2px solid var(--bos-primary); background:var(--bos-accent) !important;
  font-weight:600; padding:11px 14px;
}
.bos-status { display:inline-block; font-size:13px; font-weight:600; white-space:nowrap; }
.bos-status--ok { color:var(--bos-ok); }
.bos-status--error { color:var(--bos-error); }
.bos-review__actions { display:flex; gap:14px; flex-wrap:wrap; align-items:center; }

/* ── Success ───────────────────────────────────────────────────────────── */
.bos-success {
  text-align:center; padding:40px 24px;
  background:#f0fff0; border:1px solid #b2d8b2; border-radius:var(--bos-radius);
}
.bos-success__icon { font-size:40px; color:var(--bos-ok); line-height:1; margin-bottom:12px; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width:600px) {
  .bos-guide { padding:0 0 24px; }
  .bos-guide__step { padding:20px 16px 18px; }
  .bos-guide__step-head { flex-direction:column !important; gap:10px !important; }
  .bos-guide__title { font-size:17px !important; }
  .bos-dropzone { padding:36px 18px; }
  .bos-download-buttons { flex-direction:column; }
  .bos-btn--download { justify-content:center; }
  .bos-review__actions { flex-direction:column; }
  .bos-btn--large { width:100% !important; }
  .bos-compact { flex-direction:column !important; align-items:flex-start !important; }
  .bos-compact__sep { width:100% !important; height:1px !important; }
}
