/* Hide Woo's original top summary on the View Order page (keep items table) */
.woocommerce-account .woocommerce-view-order .woocommerce-order-overview{display:none;}
.woocommerce-account .woocommerce-view-order .woocommerce-order-details__title{display:none;}

/* Reusable dark card */
.psoo-card{border-radius:14px;padding:18px;margin:0 0 24px;box-shadow:0 8px 24px rgba(11,18,32,.22);}
.psoo-card--dark{background:#0b1220;color:#e6ecff;}
.psoo-card--dark .psoo-head{display:flex;align-items:center;gap:12px;margin-bottom:10px;}
.psoo-card--dark .psoo-badge{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:#1c2c4f;}
.psoo-card h3{margin:0;font-size:18px;line-height:24px;}

/* Summary stats */
.psoo-order-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:8px;}
@media(max-width:680px){.psoo-order-grid{grid-template-columns:1fr;}}
.psoo-stat{background:#101a33;border:1px solid #1d2a53;border-radius:10px;padding:10px 12px;}
.psoo-stat b{display:block;color:#fff;font-weight:700;margin-bottom:2px;}

/* Assignment form (same dark card) */
.psoo-assign-card .psoo-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:8px;}
@media(max-width:680px){.psoo-assign-card .psoo-form-grid{grid-template-columns:1fr;}}
.psoo-label{display:block;font-weight:600;margin:0 0 6px;color:#c7d2f0;}
.psoo-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px;}
.psoo-note{margin-left:6px;color:#9db0e0;}

/* Inline error panel + buttons — stronger selectors */
.psoo-card .psoo-error{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#2a1433;border:1px solid #7a2d8a;color:#ffdfff;border-radius:10px;padding:10px 12px;margin-bottom:12px;}
.psoo-card .psoo-error .button{border-radius:8px !important;}
.psoo-card .psoo-error .button.button-primary{background:#b44bd1 !important;border-color:#b44bd1 !important;color:#fff !important;}
.psoo-card .psoo-error .button.button-primary:hover{background:#9d38bb !important;border-color:#9d38bb !important;}

/* Buttons on dark card — stronger specificity */
.psoo-card .button{border-radius:8px !important;}
.psoo-card .button.button-primary{background:#0a915c !important;border-color:#0a915c !important;color:#fff !important;}
.psoo-card .button.button-primary:hover{background:#087a4d !important;border-color:#087a4d !important;}
.psoo-card .button:focus{outline:2px solid #1bd389 !important;outline-offset:2px;}

/* Select2 (SelectWoo) inside dark card */
.psoo-card .select2-container--default .select2-selection--single{
  background:#101a33 !important;border:1px solid #1d2a53 !important;border-radius:10px !important;height:40px !important;
}
.psoo-card .select2-container--default .select2-selection--single .select2-selection__rendered{
  color:#e6ecff !important;line-height:38px !important;padding-left:12px !important;display:flex;align-items:center;gap:8px;
}
.psoo-card .select2-container--default .select2-selection--single .select2-selection__arrow{height:38px;right:8px;}
.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#9db0e0 !important;}

/* Dropdown menu */
.select2-container{z-index:9999;}
.select2-container .select2-dropdown{
  background:#0f1a34 !important;border:1px solid #1d2a53 !important;color:#e6ecff !important;
}
.select2-results__option{padding:8px 10px;}
.select2-results__option--highlighted{background:#1b2b54;color:#fff;}

/* Avatar in options and selection (when present) */
.select2-results__option img,
.psoo-card .select2-container--default .select2-selection__rendered img{
  width:20px;height:20px;border-radius:50%;margin-right:0;vertical-align:middle;display:inline-block;
}

/* Modern modal */
.psoo-modal{position:fixed;inset:0;background:rgba(4,8,16,.6);display:none;align-items:center;justify-content:center;z-index:10000;}
.psoo-modal[aria-hidden="false"]{display:flex;}
.psoo-modal__dialog{background:#0b1220;color:#e6ecff;border:1px solid #1d2a53;border-radius:14px;min-width:300px;max-width:520px;width:90%;box-shadow:0 18px 40px rgba(0,0,0,.45);}
.psoo-modal__head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #1d2a53;}
.psoo-modal__body{padding:16px;display:grid;gap:10px;}
.psoo-modal__body label{font-weight:600;color:#c7d2f0;}
.psoo-modal__body input,.psoo-modal__body textarea{
  width:100%;background:#101a33;border:1px solid #1d2a53;border-radius:10px;color:#e6ecff;padding:10px 12px;
}
.psoo-modal__foot{padding:12px 16px;border-top:1px solid #1d2a53;display:flex;gap:8px;justify-content:flex-end;}
.psoo-modal__close{background:transparent;border:0;color:#9db0e0;font-size:24px;line-height:1;cursor:pointer;}

/* ===== Front Order Page — match Group › Orders styling ===== */

/* Card shell is already provided by .psoo-card/.psoo-bp-orderview classes from your existing CSS.
   These are the table-specific rules. */

.psoo-bp-order-items {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  overflow: hidden;
}
.psoo-bp-order-items thead tr { background: #f2f4f7; }
.psoo-bp-order-items thead th {
  color: #101828;
  padding: 16px 18px;
  font-weight: 800;
  border-bottom: 1px solid #e4e7ec;
}
.psoo-bp-order-items tbody td {
  padding: 18px;
  border-bottom: 1px solid #eef0f6;
  vertical-align: top;
  color: #182230;
}
.psoo-bp-order-items tbody tr:last-child td { border-bottom: 0; }

/* Column widths */
.psoo-col-qty   { width: 100px; text-align: center; font-weight: 800; color: #101828; }
.psoo-col-total { width: 200px; text-align: right;  font-weight: 900; color: #101828; }

/* ROW 1: Title | Qty | Total */
.psoo-bp-order-items tbody tr.psoo-item-top td { background: #f3f4f6 !important; }
.psoo-bp-order-items tbody tr.psoo-item-top:hover td { background: #e9ebef !important; }
.psoo-bp-order-items tbody tr.psoo-item-top td.psoo-prod-title {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  padding-left: 24px !important;
  padding-right: 12px !important;
}
.psoo-bp-order-items tbody tr.psoo-item-top td.psoo-prod-title .psoo-item-title a {
  color: #0f172a !important;
  text-decoration: none;
  font-weight: 900 !important;
  font-size: 20px !important;
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: inline-block;
}
.psoo-bp-order-items tbody tr.psoo-item-top td.psoo-prod-title .psoo-item-title a:hover { text-decoration: underline; }

/* Center Qty & Total + bigger */
.psoo-bp-order-items tbody tr.psoo-item-top td.psoo-col-qty,
.psoo-bp-order-items tbody tr.psoo-item-top td.psoo-col-total {
  text-align: center !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  vertical-align: middle !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

/* ROW 2: Description (left, spans 2 cols) | Image (right, centered) */
.psoo-bp-order-items tbody tr.psoo-item-bottom td {
  background: #fcfdff;
  vertical-align: middle !important;
}

/* Description side */
.psoo-bp-order-items tbody tr.psoo-item-bottom td.psoo-prod-desc {
  padding: 0 24px !important;
}
.psoo-bp-order-items tbody tr.psoo-item-bottom td.psoo-prod-desc .psoo-item-desc {
  display: flex;
  align-items: center;
  min-height: 120px;
  color: #344054;
  font-size: 14px;
  line-height: 1.6;
}

/* Image side */
.psoo-bp-order-items tbody tr.psoo-item-bottom td.psoo-prod-media {
  width: 240px;
  padding: 0 !important;
}
.psoo-bp-order-items tbody tr.psoo-item-bottom td.psoo-prod-media .psoo-media-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  padding: 8px;
}
.psoo-bp-order-items tbody tr.psoo-item-bottom td.psoo-prod-media .psoo-media-link { display: inline-flex; }
.psoo-bp-order-items tbody tr.psoo-item-bottom td.psoo-prod-media .psoo-prod-thumb {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border-radius: 14px;
  object-fit: cover;
}
.psoo-bp-order-items tbody tr.psoo-item-bottom td.psoo-prod-media .psoo-thumb-fallback {
  width: 100%;
  height: 120px;
  background: #eef2ff;
  border-radius: 14px;
}

/* Totals block (matches BP) */
.psoo-bp-totals { margin-top: 16px; display: grid; gap: 8px; }
.psoo-bp-total-row { display: flex; align-items: center; justify-content: space-between; }
.psoo-bp-total-row span { color: #475467; }
.psoo-bp-total-row strong { color: #0f172a; }

/* Link chips for selected group/project */
.psoo-selected-line { margin-top:8px; }
.psoo-chip {
  display:inline-flex; align-items:center; gap:8px;
  background:#101a33; color:#e6ecff; border:1px solid #1d2a53;
  border-radius:999px; padding:8px 12px; text-decoration:none;
  transition:transform .06s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.psoo-chip img { width:20px; height:20px; border-radius:50%; display:inline-block; }
.psoo-chip .psoo-chip-icon { font-size:16px; line-height:1; display:inline-block; }
.psoo-chip:hover { background:#0f1a34; border-color:#2a3b6d; transform:translateY(-1px); box-shadow:0 6px 14px rgba(16,24,40,.25); }
.psoo-chip--placeholder { background:#0f1a34; color:#9db0e0; border-style:dashed; }

