.nn-returns-section{margin-top:2rem;padding:1.25rem;border:1px solid rgba(0,0,0,.12);border-radius:8px}
.nn-returns-section h2{margin-top:0}
.nn-returns-form .nn-return-item{padding:.75rem 0;border-bottom:1px solid rgba(0,0,0,.08);display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}
.nn-returns-form input[type="number"]{width:80px}
.nn-returns-form textarea{width:100%;max-width:640px}
.nn-returns-notice{padding:1rem;background:#f7f7f7;border-left:4px solid #2271b1;margin:1rem 0}
.nn-guest-returns{max-width:760px}
.nn-guest-lookup-form input{width:100%;max-width:100%}
.nn-request-resolution,
.nn-withdrawal-mode{margin:1rem 0;padding:1rem;background:rgba(0,0,0,.025);border:1px solid rgba(0,0,0,.08);border-radius:6px}
.nn-returns-countdown{margin:1rem 0;padding:1rem;background:#f0f6fc;border-left:4px solid #2271b1;border-radius:4px}
.nn-returns-expired{border-left-color:#cc1818;background:#fcf0f1}
.nn-returns-error{border-left-color:#cc1818;background:#fff1f1;color:#5f2120}
.nn-status{display:inline-block;padding:.25em .6em;border-radius:999px;background:#e7f7e7;color:#006b2b;font-size:.85em;font-weight:700}
.nn-status-rejected{background:#fde2e2;color:#8a0000}.nn-status-submitted{background:#eaf2ff;color:#0b4f9c}

.woocommerce-MyAccount-navigation-link--nn-returns-history a:before{
  content:"↩";
  display:inline-block;
  margin-right:.55em;
  font-weight:700;
  line-height:1;
}


.nn-guest-order-found {
    margin: 18px 0;
    padding: 14px 16px;
    border-left: 4px solid #7ac70c;
    background: #f6fbef;
}
.nn-guest-order-found a {
    display: inline-block;
    margin-top: 6px;
}

.nn-return-item-excluded {
    opacity: .92;
}
.nn-return-item-excluded small {
    color: #8a1f1f;
    font-weight: 600;
}
.nn-returns-button[disabled],
.nn-returns-button[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
}

.nn-returns-button.nn-disabled{opacity:.55;cursor:not-allowed;}

.nn-request-resolution,
.nn-withdrawal-mode{
    margin: 16px 0;
}
.nn-request-resolution label,
.nn-withdrawal-mode label{
    display: inline-block;
    margin: 4px 0;
    cursor: pointer;
}

/* NN Returns CTA alignment */
.nn-returns-button, a.nn-returns-button, .woocommerce a.nn-returns-button, .woocommerce .button.nn-returns-button, .woocommerce a.button.nn-returns-button, .woocommerce a.button.nn_returns, .woocommerce .button.nn_returns, .woocommerce-orders-table__cell-order-actions .nn_returns, .woocommerce-MyAccount-content .nn_returns{display:flex;align-items:center;justify-content:center}

.nn-required{color:#cc1818;font-weight:700}
.nn-required-field strong{display:inline-block;margin-bottom:.35rem}
.nn-returns-form input[type="file"]{width:100%;max-width:640px}
.nn-returns-button.nn-disabled,
.nn-returns-button:disabled{opacity:.55;cursor:not-allowed}


/* Required markers */
.nn-returns-form .nn-required,
.nn-returns-form .required,
.nn-returns-form abbr.required,
.nn-returns-form label .required,
.nn-returns-form label .nn-required {
    color: #dc2626 !important;
    font-weight: 700;
    text-decoration: none;
}

.nn-policy-acceptance .nn-required {
    margin-left: 4px;
}


/* v3.0.0-dev.16 account returns history table */
.woocommerce-account .nn-returns-history-table th.nn-returns-history-products-col,
.woocommerce-account .nn-returns-history-table td.nn-returns-history-products{
    width:24%;
    max-width:260px;
}
.woocommerce-account .nn-returns-history-table td.nn-returns-history-products{
    white-space:normal;
    line-height:1.35;
    font-size:.95em;
}
.woocommerce-account .nn-returns-history-table th:nth-child(1),
.woocommerce-account .nn-returns-history-table td:nth-child(1){width:14%;}
.woocommerce-account .nn-returns-history-table th:nth-child(2),
.woocommerce-account .nn-returns-history-table td:nth-child(2){width:14%;}
.woocommerce-account .nn-returns-history-table th:nth-child(3),
.woocommerce-account .nn-returns-history-table td:nth-child(3){width:22%;}
.woocommerce-account .nn-returns-history-table th:nth-child(4),
.woocommerce-account .nn-returns-history-table td:nth-child(4){width:16%;}
@media (max-width:768px){
    .woocommerce-account .nn-returns-history-table th.nn-returns-history-products-col,
    .woocommerce-account .nn-returns-history-table td.nn-returns-history-products{
        width:auto;
        max-width:none;
    }
}

/* v3.0.0-dev.17 frontend stabilization */
.woocommerce-account .nn-returns-history-table,
.nn-returns-history-table{
    table-layout: fixed !important;
    width: 100% !important;
}
.nn-returns-history-table col.nn-col-request{width:10% !important;}
.nn-returns-history-table col.nn-col-order{width:8% !important;}
.nn-returns-history-table col.nn-col-date{width:12% !important;}
.nn-returns-history-table col.nn-col-status{width:12% !important;}
.nn-returns-history-table col.nn-col-products{width:38% !important;}
.woocommerce-account .nn-returns-history-table th,
.woocommerce-account .nn-returns-history-table td,
.nn-returns-history-table th,
.nn-returns-history-table td{
    vertical-align: middle;
}
.woocommerce-account .nn-returns-history-table th.nn-returns-history-products-col,
.woocommerce-account .nn-returns-history-table td.nn-returns-history-products,
.nn-returns-history-table th.nn-returns-history-products-col,
.nn-returns-history-table td.nn-returns-history-products{
    width:38% !important;
    max-width:38% !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height:1.45;
}
.nn-returns-history-table td.nn-returns-history-products br{
    content:"";
}

.nn-returns-form .nn-required,
.nn-returns-form .required,
.nn-returns-form abbr.required,
.nn-returns-form label .required,
.nn-returns-form label .nn-required,
.woocommerce .nn-returns-form .nn-required,
.woocommerce .nn-returns-form .required,
.woocommerce .nn-required-field .nn-required,
.nn-required-field .nn-required,
.nn-policy-acceptance .nn-required{
    color:#dc2626 !important;
    font-weight:800 !important;
    text-decoration:none !important;
}

.nn-returns-notice,
.woocommerce .nn-returns-notice{
    position:relative;
    display:block;
    margin:18px 0 !important;
    padding:16px 18px 16px 52px !important;
    border:1px solid #dbeafe !important;
    border-left:5px solid #00aeef !important;
    border-radius:12px !important;
    background:#f0f9ff !important;
    color:#123047 !important;
    box-shadow:0 8px 24px rgba(17,24,39,.06);
    line-height:1.55;
}
.nn-returns-notice::before{
    content:"i";
    position:absolute;
    left:17px;
    top:17px;
    width:22px;
    height:22px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#00aeef;
    color:#fff;
    font-weight:800;
    font-size:14px;
    font-family:Arial, sans-serif;
}
.nn-returns-notice strong{color:inherit;}
.nn-returns-error,
.woocommerce .nn-returns-error{
    border-color:#fecaca !important;
    border-left-color:#dc2626 !important;
    background:#fef2f2 !important;
    color:#7f1d1d !important;
}
.nn-returns-error::before{
    content:"!";
    background:#dc2626;
}
.nn-returns-success,
.woocommerce .nn-returns-success,
.nn-guest-order-found{
    border-color:#bbf7d0 !important;
    border-left-color:#00a651 !important;
    background:#f0fdf4 !important;
    color:#14532d !important;
    border-radius:12px !important;
    box-shadow:0 8px 24px rgba(17,24,39,.06);
}
.nn-returns-success::before,
.nn-guest-order-found::before{
    content:"✓";
    background:#00a651;
}
.nn-returns-warning,
.woocommerce .nn-returns-warning,
.nn-returns-countdown{
    border-color:#fed7aa !important;
    border-left-color:#f68712 !important;
    background:#fff7ed !important;
    color:#7c2d12 !important;
    border-radius:12px !important;
}
.nn-returns-warning::before,
.nn-returns-countdown::before{
    content:"!";
    background:#f68712;
}

@media (max-width: 768px){
    .woocommerce-account .nn-returns-history-table,
    .nn-returns-history-table{
        table-layout:auto !important;
    }
    .woocommerce-account .nn-returns-history-table th.nn-returns-history-products-col,
    .woocommerce-account .nn-returns-history-table td.nn-returns-history-products,
    .nn-returns-history-table th.nn-returns-history-products-col,
    .nn-returns-history-table td.nn-returns-history-products{
        width:auto !important;
        max-width:none !important;
    }
    .nn-returns-notice,
    .woocommerce .nn-returns-notice{
        padding:14px 16px 14px 46px !important;
    }
    .nn-returns-notice::before{
        left:14px;
        top:15px;
    }
}


/* v2.3.0 final frontend polish */
.nn-returns-form abbr.required,
.nn-returns-form .required,
.nn-required-field abbr.required,
.nn-policy-acceptance abbr.required{
    border:0 !important;
    text-decoration:none !important;
    background:none !important;
}
.nn-returns-countdown,
.woocommerce .nn-returns-countdown{
    border-left:0 !important;
    padding-left:16px !important;
}
.nn-returns-countdown::before,
.woocommerce .nn-returns-countdown::before{
    content:none !important;
    display:none !important;
}

/* v2.5.0 request types and conditional fields */
.nn-request-types{margin:1rem 0;display:grid;gap:.75rem}
.nn-request-type-option{display:flex;gap:.7rem;align-items:flex-start;padding:1rem;border:1px solid rgba(0,0,0,.12);border-radius:10px;background:#fff;cursor:pointer}
.nn-request-type-option:has(input:checked){border-color:#00aeef;box-shadow:0 0 0 2px rgba(0,174,239,.12)}
.nn-request-type-option span{display:flex;flex-direction:column;gap:.2rem}
.nn-request-type-option small{opacity:.75;line-height:1.4}
.nn-type-fields{margin:1rem 0;padding:1rem;border:1px solid rgba(0,0,0,.1);border-radius:10px;background:#fafafa}
.nn-identifier-field{width:100%;margin-top:.75rem;padding:.75rem;border-left:3px solid #e0b323;background:#fff8d6}
.nn-identifier-field input{width:100%;max-width:420px}
.nn-type-fields select{width:100%;max-width:520px}


.nn-request-type-option { line-height: 1em !important; }
.nn-option-disabled { opacity: .48; cursor: not-allowed; }
.nn-option-disabled input { cursor: not-allowed; }
.nn-file-dropzone { margin-top: 8px; min-height: 150px; border: 2px dashed #b8c1c8; border-radius: 10px; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; cursor: pointer; background: #fafbfc; transition: border-color .2s ease, background .2s ease; }
.nn-file-dropzone:hover, .nn-file-dropzone.is-dragover { border-color: #387896; background: #f1f7fa; }
.nn-file-dropzone.has-file { border-color: #00a651; background: #f1fbf5; }
.nn-file-dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.nn-file-dropzone-icon { font-size: 30px; line-height: 1; }
.nn-file-dropzone-title { font-weight: 700; }
.nn-file-dropzone-or { font-size: 12px; opacity: .65; }
.nn-file-dropzone-button { display: inline-block; padding: 7px 13px; border: 1px solid currentColor; border-radius: 6px; font-weight: 600; }
.nn-file-dropzone-name { margin-top: 4px; font-size: 13px; word-break: break-word; }


/* v2.5.2: on-hold status uses a yellow badge */
.nn-status-on_hold {
    background: #FFF4CC !important;
    color: #7A5700 !important;
    border: 0 !important;
}

/* v3.0.0-RC3: field-level validation and upload preview. */
.nn-has-error input:not([type="radio"]):not([type="checkbox"]),
.nn-has-error select,
.nn-has-error textarea,
.nn-has-error .nn-file-dropzone { border-color: #dc2626 !important; box-shadow: 0 0 0 1px #dc2626; }
.nn-field-error { margin-top: 7px; color: #b91c1c; font-size: 13px; font-weight: 600; line-height: 1.4; }
.nn-file-dropzone-remove { margin-top: 5px; padding: 5px 10px; border: 0; border-radius: 5px; background: #fff; color: #b91c1c; text-decoration: underline; cursor: pointer; }


/* v3.0.0-RC6 polish */
.nn-identifier-field input[type="text"]{background:#fff !important;border-color:#d6b84b !important;}
.nnrm-success-modal{position:fixed;inset:0;z-index:999999;background:rgba(15,23,42,.62);display:none;align-items:center;justify-content:center;padding:20px;}
.nnrm-success-modal.is-open{display:flex;}
.nnrm-success-modal-card{position:relative;background:#fff;width:min(560px,100%);border-radius:16px;padding:32px;box-shadow:0 24px 70px rgba(0,0,0,.25);text-align:center;}
.nnrm-success-modal-close{position:absolute;right:14px;top:10px;border:0;background:transparent;font-size:28px;cursor:pointer;}
.nnrm-success-icon{width:58px;height:58px;margin:0 auto 14px;border-radius:50%;display:grid;place-items:center;background:#e9f8ef;color:#00a651;font-size:30px;font-weight:800;}
.nnrm-success-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:22px 0;}
.nnrm-success-tip{margin:20px 0 0;padding:14px;background:#fff8d6;border-radius:10px;text-align:left;}
@media (max-width:600px){.nnrm-success-modal-card{padding:26px 18px}.nnrm-success-actions .button{width:100%;text-align:center}}

/* RC6: compact date field and DOA countdown */
.nn-type-fields-doa input[type="date"]{
    width:auto !important;
    min-width:170px;
    max-width:220px;
    display:inline-block;
}
.nn-returns-countdown-doa{margin-top:12px;}


/* v3.0.0-RC11: safe UI polish built on RC6 */
.nn-request-type-countdown .nn-returns-countdown{margin:12px 0 !important;}
.nn-request-type-countdown{display:none;}
.nn-identifier-field{background:#fff8d6 !important;border-left-color:#e0b323 !important;}
.nn-identifier-field input[type="text"]{background:#fff !important;}

.nn-customer-request-detail{margin:0 0 28px;padding:22px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.06)}
.nn-customer-request-detail h2{margin-top:0}.nn-customer-request-detail .nn-request-history>div{padding:10px 0;border-bottom:1px solid #eef2f7}.nn-customer-request-detail .nn-request-history>div:last-child{border-bottom:0}


/* v3.0.0: modal polish */
.nnrm-success-actions > .button,
.nnrm-success-actions > a.button,
.nnrm-success-actions > button.button {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.nnrm-info-icon {
    background: #e8f4fb;
    color: #387896;
    font-family: Georgia, serif;
    font-style: italic;
}
@media (max-width:600px){
    .nnrm-success-actions { flex-direction: column; }
    .nnrm-success-actions > .button,
    .nnrm-success-actions > a.button,
    .nnrm-success-actions > button.button { width:100%; }
}
