/* ============================================================
   Warehouse Order Form — wof-style.css
   ============================================================ */

/* Wrapper */
#wof-wrap {
    font-family: inherit;
    max-width: 100%;
    margin: 0 auto;
}

/* ---- Customer Info Section ---- */
.wof-customer-section {
    background: #f7f9fc;
    border: 1px solid #dde3ef;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 28px;
}
.wof-customer-section h3 {
    margin: 0 0 18px;
    font-size: 1.1em;
    color: #1e3c78;
}
.wof-customer-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.wof-field label {
    display: block;
    font-size: 0.82em;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.wof-field input,
.wof-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c8d0de;
    border-radius: 5px;
    font-size: 0.95em;
    box-sizing: border-box;
    transition: border-color .2s;
}
.wof-field input:focus,
.wof-field textarea:focus {
    border-color: #1e3c78;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30,60,120,.1);
}
.wof-field--full {
    grid-column: 1 / -1;
}
.req {
    color: #c0392b;
}

/* ---- Scrollable Table Wrapper ---- */
.wof-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #dde3ef;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

/* ---- Product Table ---- */
#wof-product-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    min-width: 720px;
}
#wof-product-table thead tr {
    background: #1e3c78;
    color: #fff;
}
#wof-product-table thead th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.82em;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}
#wof-product-table tbody tr {
    border-bottom: 1px solid #edf0f7;
    transition: background .15s;
}
#wof-product-table tbody tr:nth-child(even) {
    background: #f7f9ff;
}
#wof-product-table tbody tr:hover {
    background: #eaf0ff;
}
#wof-product-table td {
    padding: 10px 10px;
    vertical-align: middle;
    color: #333;
}

/* Image column */
.col-img { width: 68px; }
.wof-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
    border: 1px solid #dde3ef;
}

/* Qty input */
.col-qty { width: 110px; text-align: center; }
.wof-qty {
    width: 80px;
    text-align: center;
    padding: 6px 8px;
    border: 1px solid #c8d0de;
    border-radius: 5px;
    font-size: 0.95em;
    transition: border-color .2s, background .2s;
}
.wof-qty:focus {
    border-color: #1e3c78;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30,60,120,.1);
}
.wof-qty.has-value {
    background: #e6f4ea;
    border-color: #27ae60;
}

/* ---- Order Summary ---- */
#wof-summary {
    background: #f0f7ee;
    border: 1px solid #b7ddb0;
    border-radius: 8px;
    padding: 18px 22px;
    margin-top: 22px;
}
#wof-summary h4 {
    margin: 0 0 12px;
    color: #2c6e28;
    font-size: 1em;
}
#wof-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
#wof-summary-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    padding: 4px 0;
    border-bottom: 1px dashed #c5dfc2;
}
#wof-summary-list li:last-child { border-bottom: none; }
.wof-sum-label { font-weight: 600; color: #333; }
.wof-sum-qty   { color: #555; font-size: 0.88em; }

/* ---- Submit Button ---- */
.wof-submit-wrap {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.wof-btn {
    background: #1e3c78;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: .03em;
}
.wof-btn:hover:not(:disabled) {
    background: #163268;
    transform: translateY(-1px);
}
.wof-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.wof-btn.loading {
    background: #5a7db8;
    cursor: wait;
}

/* ---- Status Messages ---- */
#wof-message {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.92em;
    display: none;
}
#wof-message.success {
    display: block;
    background: #eaf7ec;
    border: 1px solid #82c882;
    color: #27612b;
}
#wof-message.error {
    display: block;
    background: #fef0ef;
    border: 1px solid #e08080;
    color: #7a1c1c;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 600px) {
    .wof-customer-fields {
        grid-template-columns: 1fr;
    }
    .wof-submit-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}
