/* ============================================================
   Customer Orders – Portal Styles
   ============================================================ */

/* ?? Page shell ??????????????????????????????????????????? */
#coWrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 20px 80px;
    font-family: "Verdana", sans-serif;
    font-size: 14px;
}

/* ?? Section card ????????????????????????????????????????? */
.co-card {
    background: #f8f9ff;
    border: 1px solid #c8cfe8;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.co-card h3 {
    margin: 0 0 14px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #445;
    border-bottom: 2px solid #c8cfe8;
    padding-bottom: 6px;
}

/* ?? Form rows ???????????????????????????????????????????? */
.co-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.co-label {
    width: 140px;
    text-align: right;
    padding-right: 8px;
    color: #334;
    font-size: 12px;
    flex-shrink: 0;
}

.co-input,
.co-select {
    height: 28px;
    border: 1px solid #b0b8d8;
    border-radius: 4px;
    padding: 0 8px;
    font-family: "Verdana", sans-serif;
    font-size: 12px;
    background: #fff;
    color: #222;
    outline: none;
    transition: border-color .2s;
}

.co-input:focus,
.co-select:focus {
    border-color: #5577cc;
    box-shadow: 0 0 0 2px rgba(85,119,204,.15);
}

.co-input { width: 260px; }
.co-select { width: 280px; }

.co-input.narrow  { width: 80px; }
.co-input.medium  { width: 160px; }

/* customer suggestion dropdown */
#custSuggestions {
    position: absolute;
    background: #fff;
    border: 1px solid #b0b8d8;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 200;
    width: 260px;
    max-height: 160px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,.12);
}

#custSuggestions div {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
}

#custSuggestions div:hover { background: #e6ebff; }

.co-input-wrap { position: relative; display: inline-block; }

/* ?? Order lines table ???????????????????????????????????? */
#orderLinesContainer {
    margin-top: 6px;
}

.order-line {
    background: #fff;
    border: 1px solid #d0d6ee;
    border-radius: 5px;
    padding: 14px 16px;
    margin-bottom: 12px;
    position: relative;
}

.order-line .line-num {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 11px;
    color: #99a;
    font-weight: bold;
}

.order-line .line-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding-left: 28px;
    align-items: flex-end;
}

.order-line .field-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.order-line .field-group label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #667;
}

.order-line .line-price {
    font-size: 13px;
    font-weight: bold;
    color: #334;
    align-self: flex-end;
    min-width: 70px;
    text-align: right;
}

/* remove line btn */
.remove-line {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: #aab;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color .15s;
}
.remove-line:hover { color: #c33; }

/* upload area */
.upload-area {
    border: 2px dashed #b0b8d8;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 11px;
    color: #778;
    cursor: pointer;
    text-align: center;
    width: 130px;
    background: #f4f6ff;
    transition: border-color .2s, background .2s;
}
.upload-area:hover {
    border-color: #5577cc;
    background: #eef0ff;
}
.upload-area input[type="file"] { display: none; }

/* ?? Add line button ?????????????????????????????????????? */
#addLineBtn {
    background: #eef0ff;
    border: 1px dashed #8899cc;
    border-radius: 4px;
    color: #5566aa;
    font-size: 12px;
    padding: 7px 18px;
    cursor: pointer;
    transition: background .2s, color .2s;
    font-family: "Verdana", sans-serif;
}
#addLineBtn:hover {
    background: #5566aa;
    color: #fff;
    border-style: solid;
}

/* ?? Totals bar ??????????????????????????????????????????? */
#coTotalsBar {
    background: #e6ebff;
    border: 1px solid #c0c8e8;
    border-radius: 6px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    flex-wrap: wrap;
}

.totals-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.totals-item .t-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #667;
}

.totals-item .t-value {
    font-size: 18px;
    font-weight: bold;
    color: #334;
}

#saveOrderBtn {
    height: 38px;
    padding: 0 28px;
    background: #3355aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: "Verdana", sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s;
    letter-spacing: .03em;
}
#saveOrderBtn:hover { background: #223388; }
#saveOrderBtn:disabled {
    background: #aab;
    cursor: default;
}

/* ?? Company badge ???????????????????????????????????????? */
.company-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: .05em;
    margin-left: 8px;
    vertical-align: middle;
}
.badge-signs4usa { background: #ffeedd; color: #a04000; }
.badge-ysn       { background: #ddeeff; color: #004488; }
.badge-cpsupply  { background: #ddfff0; color: #006633; }

/* ?? Empty state ?????????????????????????????????????????? */
#noLinesMsg {
    color: #99a;
    font-size: 12px;
    font-style: italic;
    padding: 10px 0 4px 28px;
}

/* ?? Misc ????????????????????????????????????????????????? */
.co-divider {
    border: none;
    border-top: 1px solid #d8ddf0;
    margin: 4px 0 14px;
}

select.co-select option[value=""] { color: #aaa; }


/* ============================================================
   Customer Orders – YardSignNinjas-ish theme
   (scoped to #coWrapper so it doesn't affect other portal pages)
   ============================================================ */
#coWrapper{
  --ysn-maroon: #7b1f2a;      /* primary */
  --ysn-maroon-2: #5f1720;    /* hover/darker */
  --ysn-cream: #faf7f5;       /* page bg tint */
  --ysn-ink: #2a2a2a;
  --ysn-border: #d8cfd0;
  --ysn-card: #ffffff;
  --ysn-muted: #6f6a6a;
}

/* page background tint (only the module area) */
#coWrapper{
  color: var(--ysn-ink);
}

/* cards */
#coWrapper .co-card{
  background: var(--ysn-card);
  border: 1px solid var(--ysn-border);
}

/* section headers */
#coWrapper .co-card h3{
  color: var(--ysn-maroon);
  border-bottom: 2px solid rgba(123,31,42,.22);
}

/* inputs focus */
#coWrapper .co-input:focus,
#coWrapper .co-select:focus{
  border-color: var(--ysn-maroon);
  box-shadow: 0 0 0 2px rgba(123,31,42,.12);
}

/* add-line button */
#coWrapper #addLineBtn{
  background: #fff;
  border: 1px dashed rgba(123,31,42,.55);
  color: var(--ysn-maroon);
}
#coWrapper #addLineBtn:hover{
  background: var(--ysn-maroon);
  color: #fff;
  border-style: solid;
}

/* totals bar */
#coWrapper #coTotalsBar{
  background: rgba(123,31,42,.06);
  border: 1px solid rgba(123,31,42,.18);
}

/* primary action */
#coWrapper #saveOrderBtn{
  background: var(--ysn-maroon);
}
#coWrapper #saveOrderBtn:hover{
  background: var(--ysn-maroon-2);
}
#coWrapper #saveOrderBtn:disabled{
  background: #b9aeb0;
}

/* badge colors per company (optional) */
#coWrapper .badge-signs4usa { background: rgba(123,31,42,.12); color: var(--ysn-maroon); }
#coWrapper .badge-ysn       { background: rgba(30,80,140,.12); color: #1e508c; }
#coWrapper .badge-cpsupply  { background: rgba(0,102,51,.12);  color: #006633; }

/* helper toast/popup */
#coWrapper .co-toast{
  position: fixed;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  z-index: 2000;
  background: #111;
  color: #fff;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .18s ease, top .18s ease;
}
#coWrapper .co-toast.show{
  opacity: 1;
  top: 18px;
}

/* ?? Customer DB hint ????????????????????????????????????? */
.co-hint-text {
    font-size: 11px;
    color: #7b1f2a;
    font-style: italic;
    margin-top: 4px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.2s ease;
}
.co-hint-text.show {
    opacity: 1;
    max-height: 20px;
}