/* NJAP withdrawals — Flatsome / B2B-aligned */

:root {
    --njap-wd-accent: #e9467b;
    --njap-wd-accent-dark: #d63a6f;
    --njap-wd-accent-soft: #fce7f0;
    --njap-wd-accent-border: #f5bdd3;
}

.njap-wd-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 0 2rem;
    padding: 0;
}

.njap-wd-wrap h1.njap-wd-title {
    margin: 0 0 1rem;
    padding: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    color: #222;
}

.njap-wd-lead {
    margin: 0 0 2rem;
    padding: 0;
    color: #666;
    font-size: 0.98rem;
    line-height: 1.55;
}

.njap-wd-lead a {
    color: var(--njap-wd-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.njap-wd-lead a:hover {
    color: var(--njap-wd-accent-dark);
}

.njap-wd-form {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.njap-wd-section-title {
    margin: 1.5rem 0 0.75rem;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: #222;
}

.njap-wd-form > .njap-wd-section-title:first-child {
    margin-top: 0;
}

.njap-wd-delivery-meta {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--njap-wd-accent-border);
    background: var(--njap-wd-accent-soft);
    color: #555;
    font-size: 0.92rem;
    line-height: 1.55;
}

.njap-wd-notice a {
    color: var(--njap-wd-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.njap-wd-field {
    margin: 0 0 1rem;
    padding: 0;
}

.njap-wd-field label {
    display: block;
    margin: 0 0 0.4rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    color: #222;
}

.njap-wd-form input[type="text"],
.njap-wd-form input[type="email"],
.njap-wd-form input[type="number"],
.njap-wd-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 2.507em;
    margin: 0;
    padding: 0 0.75em;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 0;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    color: #333;
    font-size: 1em;
    line-height: 1.5;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.njap-wd-form textarea {
    min-height: 6.5em;
    padding-top: 0.65em;
    padding-bottom: 0.65em;
    resize: vertical;
}

.njap-wd-form input:focus,
.njap-wd-form textarea:focus {
    outline: none;
    border-color: var(--njap-wd-accent);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 1px var(--njap-wd-accent);
}

.njap-wd-items {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.njap-wd-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0.85rem 0;
    border: 0;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
}

.njap-wd-item:last-child {
    border-bottom: 0;
}

.njap-wd-item > span:first-child {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1 1 60%;
    min-width: 0;
    line-height: 1.35;
    font-size: 0.98rem;
}

.njap-wd-item input[type="checkbox"] {
    accent-color: var(--njap-wd-accent);
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.njap-wd-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    color: #666;
    font-size: 0.92rem;
    white-space: nowrap;
}

.njap-wd-form .njap-wd-qty input[type="number"] {
    width: 4.5rem !important;
    min-width: 4.5rem !important;
    max-width: 4.5rem !important;
    min-height: 2.507em !important;
    padding: 0 0.5em !important;
    text-align: center;
    appearance: textfield;
    -webkit-appearance: textfield;
}

.njap-wd-qty input[type="number"]::-webkit-outer-spin-button,
.njap-wd-qty input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.njap-wd-confirm {
    margin: 1.25rem 0 0;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--njap-wd-accent-border);
    background: var(--njap-wd-accent-soft);
    color: #555;
    font-size: 0.92rem;
    line-height: 1.55;
}

.njap-wd-confirm p {
    margin: 0 0 0.75rem;
}

.njap-wd-confirm p:last-child {
    margin-bottom: 0;
}

.njap-wd-submit {
    margin: 1.25rem 0 0;
    padding: 0;
}

.njap-wd-button,
.njap-wd-form .button.alt,
.njap-wd-wrap .button.alt {
    display: inline-block;
    min-height: 2.8em;
    margin: 0;
    padding: 0 1.5em;
    border-radius: 0 !important;
    background: var(--njap-wd-accent) !important;
    border-color: var(--njap-wd-accent) !important;
    color: #fff !important;
    font-size: 0.98em;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    line-height: 2.8em;
}

.njap-wd-button:hover,
.njap-wd-form .button.alt:hover,
.njap-wd-wrap .button.alt:hover {
    background: var(--njap-wd-accent-dark) !important;
    border-color: var(--njap-wd-accent-dark) !important;
    color: #fff !important;
}

.njap-wd-summary {
    margin: 0;
    padding: 0;
}

.njap-wd-summary-lead {
    margin: 0 0 1rem;
    font-size: 0.98rem;
    color: #666;
    line-height: 1.55;
}

.njap-wd-summary-block {
    margin: 0 0 1.25rem;
    padding: 0 0 1.25rem;
    border-bottom: 1px solid #eee;
}

.njap-wd-summary-block:last-of-type {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.njap-wd-summary-status {
    display: inline-block;
    margin: 0 0 0.75rem;
    padding: 0.2rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
}

.njap-wd-summary-status--pending {
    background: var(--njap-wd-accent-soft);
    color: #9d174d;
    border: 1px solid var(--njap-wd-accent-border);
}

.njap-wd-summary-status--handled {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.njap-wd-summary-items {
    margin: 0.5rem 0 0.75rem 1.1rem;
}

.njap-wd-summary-meta {
    color: #777;
    font-size: 0.9rem;
}

.njap-wd-summary-note {
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--njap-wd-accent-border);
    background: var(--njap-wd-accent-soft);
    color: #555;
    font-size: 0.92rem;
    line-height: 1.55;
}

.njap-wd-summary-back {
    margin: 1.25rem 0 0;
}

.njap-wd-form p {
    margin-bottom: 0;
}

.col-inner .njap-wd-wrap {
    padding-left: 0;
    padding-right: 0;
}

/* My Account order actions */
body.woocommerce-account .woocommerce-orders-table__cell-order-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    white-space: normal !important;
}

body.woocommerce-account .woocommerce-orders-table__cell-order-actions a.button,
body.woocommerce-account .woocommerce-orders-table__cell-order-actions a.woocommerce-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 6px 12px !important;
    border-radius: 0 !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    line-height: 1.35 !important;
    text-transform: none !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

body.woocommerce-account .woocommerce-orders-table__cell-order-actions a.button.gfe_withdrawal {
    background: transparent !important;
    color: var(--njap-wd-accent-dark) !important;
    border: 1px solid var(--njap-wd-accent-border) !important;
}

body.woocommerce-account .woocommerce-orders-table__cell-order-actions a.button.gfe_withdrawal:hover {
    background: var(--njap-wd-accent-soft) !important;
    border-color: var(--njap-wd-accent) !important;
    color: var(--njap-wd-accent-dark) !important;
}

body.woocommerce-account .woocommerce-orders-table__cell-order-actions a.button.gfe_withdrawal_summary {
    background: #fff7ed !important;
    color: #9a3412 !important;
    border: 1px solid #fdba74 !important;
}

body.woocommerce-account .woocommerce-orders-table__cell-order-actions a.button.gfe_withdrawal_summary:hover {
    background: #ffedd5 !important;
    border-color: #fb923c !important;
}

body.woocommerce-account .woocommerce-orders-table__cell-order-actions a.button.gfe_withdrawal_summary_done {
    background: var(--njap-wd-accent-soft) !important;
    color: #9d174d !important;
    border: 1px solid var(--njap-wd-accent-border) !important;
}

body.woocommerce-account .woocommerce-orders-table__cell-order-actions a.button.gfe_withdrawal_summary_done:hover {
    background: #fbcfe8 !important;
    border-color: var(--njap-wd-accent) !important;
}

@media (max-width: 549px) {
    .njap-wd-item {
        flex-direction: column;
        align-items: stretch;
    }

    .njap-wd-item > span:first-child {
        flex: 1 1 100%;
    }

    .njap-wd-qty {
        justify-content: space-between;
        width: 100%;
    }

    .njap-wd-button,
    .njap-wd-form .button.alt,
    .njap-wd-wrap .button.alt {
        width: 100%;
        text-align: center;
    }
}

/* Legacy GFE class aliases (cached pages / old markup) */
.gfe-withdrawal {
    width: 100%;
    max-width: 100%;
    margin: 0 0 2rem;
    padding: 0;
}

.gfe-withdrawal-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.gfe-withdrawal .button.alt {
    background: var(--njap-wd-accent) !important;
    border-color: var(--njap-wd-accent) !important;
    border-radius: 0 !important;
}

.gfe-withdrawal .button.alt:hover {
    background: var(--njap-wd-accent-dark) !important;
    border-color: var(--njap-wd-accent-dark) !important;
}
