/* WCCModal - custom modal styles (native <dialog>)
   Flat design. Scoped + self-contained so it renders consistently on ANY theme:
   box-sizing, fonts, colors, buttons and inputs are all normalised inside the modal. */
.wcc-dialog,
.wcc-modal,
.wcc-modal-head,
.wcc-modal-body,
.wcc-modal-notice,
.wcc-modal-foot,
.wcc-modal button,
.wcc-modal input,
.wcc-modal textarea,
.wcc-modal select{
    box-sizing: border-box;
}
.wcc-dialog{
    border: 0;
    padding: 0;
    margin: auto;
    background: transparent;
    max-width: 640px;
    width: calc(100% - 40px);
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}
.wcc-dialog::backdrop{
    background: rgba(0,0,0,.6);
}
.wcc-modal{
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    position: relative;
    color: #333;
    text-align: left;
}
.wcc-modal-head{
    padding: 18px 22px;
    background: #f7f7f7;
    border-bottom: 1px solid #e2e2e2;
}
.wcc-modal-sub{
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #666;
    line-height: 1.4;
}
.wcc-modal-title{
    font-size: 24px;
    font-weight: 400;
    color: #23282d;
    line-height: 1.3;
}
.wcc-modal-body{
    padding: 20px 22px;
    overflow-y: auto;
    color: #333;
    font-size: 14px;
}
.wcc-modal-notice{
    padding: 0 22px;
}
.wcc-modal-notice .wcc_error{
    font-size: 15px;
    color: #FF0000;
    display: block;
    padding: 6px 0;
}
.wcc-modal-notice .wcc_sucess{
    font-size: 15px;
    color: #008000;
    display: block;
    padding: 6px 0;
}
.wcc-modal-foot{
    padding: 14px 22px;
    text-align: right;
    border-top: 1px solid #e2e2e2;
    background: #f7f7f7;
}

/* Buttons - high specificity + !important so theme button resets cannot break them */
.wcc-modal button.wcc-btn{
    display: inline-block;
    padding: 8px 18px;
    margin-left: 8px;
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #333333;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
    text-shadow: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    overflow: visible;
    outline: none;
}
.wcc-modal button.wcc-btn:hover{
    background: #f0f0f0;
    border-color: #cccccc;
    color: #333333;
}
.wcc-modal button.wcc-btn-confirm{
    background: #2c2c2c;
    border-color: #2c2c2c;
    color: #ffffff;
}
.wcc-modal button.wcc-btn-confirm:hover{
    background: #444444;
    border-color: #444444;
    color: #ffffff;
}
.wcc-modal button.wcc-btn:focus-visible{
    outline: 2px solid #2c2c2c;
    outline-offset: 1px;
}
.wcc-modal button.wcc-btn[disabled]{
    opacity: .5;
    cursor: default;
}

/* Form fields inside the modal - normalised against theme styles */
.wcc-modal input[type="text"],
.wcc-modal input[type="number"],
.wcc-modal input[type="email"],
.wcc-modal input[type="radio"],
.wcc-modal select,
.wcc-modal textarea{
    font-family: inherit;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    box-shadow: none;
    text-shadow: none;
}
.wcc-modal-loading .wcc-modal-body{
    opacity: .6;
}
.wcc-modal-loading:after{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    border: 3px solid #ddd;
    border-top-color: #2c2c2c;
    border-radius: 50%;
    animation: wcc-spin .8s linear infinite;
}
@keyframes wcc-spin{
    to{ transform: rotate(360deg); }
}
.wcc-modal .wcc-partial-loading,
.wcc-modal .wcc-spinner{
    text-align: center;
    padding: 20px;
}

/* Cancellation Fee Card - Bootstrap "alert-warning" style (front-end popups) */
.wcc-modal .wc-cancel-fee-card{
    position: relative;
    margin: 16px 0 0;
    padding: 12px 16px 12px 18px;
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #856404;
}
.wcc-modal .wc-cancel-fee-card strong{
    font-weight: 600;
    color: #664d03;
}
.wcc-modal .wc-cancel-fee-card::before{
    content: "\26A0";
    margin-right: 8px;
    font-size: 15px;
    color: #ffc107;
    vertical-align: -1px;
}
.wcc-modal-body > .wc-cancel-fee-card:last-child{
    margin-bottom: 0;
}

/* ------------------------------------------------------------------
 * Cancellation Request popup content (admin Requests page + any modal)
 * Scoped under .wcc-modal so it renders consistently in every theme.
 * ------------------------------------------------------------------ */

/* Label / value rows (full + partial request details) */
.wcc-modal .wc-cancel-meta{
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}
.wcc-modal .wc-cancel-meta label{
    display: inline-block;
    min-width: 140px;
    margin-right: 6px;
    font-weight: 600;
    color: #555;
}
.wcc-modal .wc-cancel-meta strong{
    color: #2c2c2c;
}

/* Section headings inside request-detail popups */
.wcc-modal h4{
    margin: 18px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e2e2;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #666;
}

/* Admin partial request items table (overrides widefat inside the modal) */
.wcc-modal table.wc-cancel-partial-items{
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0 12px;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}
.wcc-modal table.wc-cancel-partial-items th{
    padding: 8px 12px;
    text-align: left;
    background: #f7f7f7;
    border-bottom: 1px solid #e2e2e2;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #666;
}
.wcc-modal table.wc-cancel-partial-items td{
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.wcc-modal table.wc-cancel-partial-items tbody tr:last-child td{
    border-bottom: 0;
}
.wcc-modal table.wc-cancel-partial-items tbody tr:nth-child(even){
    background: #fafafa;
}

/* Refund method selection (partial approve popup) */
.wcc-modal .wc-cancel-refund-methods{
    margin: 12px 0 0;
    padding: 14px 16px 12px;
    background: #fcfcfc;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
}
/* Only the "Refund method:" legend is styled as a heading. The former bare
   `.wc-cancel-refund-methods > label` selector ALSO matched the radio options and,
   being one element higher in specificity, overrode their flex layout with
   display:block. Narrowing with :not() keeps the options as clean selectable rows. */
.wcc-modal .wc-cancel-refund-methods > label:not(.wc-cancel-refund-radio){
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
}
.wcc-modal .wc-cancel-refund-radio{
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #333;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.wcc-modal .wc-cancel-refund-radio:hover{
    background: #fff;
    border-color: #d9d9d9;
}
.wcc-modal .wc-cancel-refund-radio:has(input:checked){
    background: #fff;
    border-color: #2c2c2c;
    font-weight: 600;
}
.wcc-modal .wc-cancel-refund-radio input[type="radio"]{
    margin: 0;
    flex: 0 0 auto;
    accent-color: #2c2c2c;
}

/* Refund amount summary row (partial approve popup) */
.wcc-modal .wc-cancel-refund-amount{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 0;
    padding: 10px 14px;
    background: #f1f8f1;
    border: 1px solid #cfe3cf;
    border-left: 4px solid #2e7d32;
    border-radius: 4px;
}
.wcc-modal .wc-cancel-refund-amount label{
    min-width: 0;
    margin: 0;
    font-weight: 600;
    color: #1b5e20;
}
.wcc-modal .wc-cancel-refund-amount strong{
    font-size: 18px;
    color: #1b5e20;
}

/* Cancellation fee card in admin approve popup - gray theme with red amount */
.wcc-modal .wc-cancel-fee-card-admin{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 0;
    padding: 10px 14px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #9e9e9e;
    border-radius: 4px;
}
.wcc-modal .wc-cancel-fee-card-admin label{
    min-width: 0;
    margin: 0;
    font-weight: 600;
    color: #424242;
}
.wcc-modal .wc-cancel-fee-card-admin strong{
    font-size: 18px;
    color: #c62828;
}

/* Approved / Declined status banners */
.wcc-modal .wc-cancel-meta.wc-cancel-approved,
.wcc-modal .wc-cancel-meta.wc-cancel-declined{
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 4px;
    border-left: 4px solid;
}
.wcc-modal .wc-cancel-meta.wc-cancel-approved{
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #1b5e20;
    background: #e8f5e9;
    border-left-color: #2e7d32;
}
.wcc-modal .wc-cancel-meta.wc-cancel-declined{
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #b71c1c;
    background: #fdecea;
    border-left-color: #c62828;
}
.wcc-modal .wc-cancel-approved span,
.wcc-modal .wc-cancel-declined span{
    display: block;
}
.wcc-modal .wc-cancel-meta.wc-cancel-approved label,
.wcc-modal .wc-cancel-meta.wc-cancel-declined label{
    min-width: 60px;
    color: inherit;
}
.wcc-modal span.wc-cancel-approved-icon,
.wcc-modal span.wc-cancel-declined-icon{
    font-weight: 600;
    font-size: 15px;
}
/* Refund row inside the Approved banner (partial request detail popup).
   High specificity overrides the generic ".wc-cancel-approved span" display:block
   so this row lays out as a clean flex line under the "Approved" heading. */
.wcc-modal .wc-cancel-meta.wc-cancel-approved .wc-cancel-refund-line{
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(46,125,50,.25);
}
.wcc-modal .wc-cancel-meta.wc-cancel-approved .wc-cancel-refund-line label{
    min-width: 0;
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: baseline;
}
.wcc-modal .wc-cancel-refund-val{
    font-size: 16px;
    line-height: 1.4;
    vertical-align: baseline;
    color: #1b5e20;
}
/* WooCommerce price layout: wc_price() wraps the symbol in .woocommerce-Price-currencySymbol.
   Keep it on the same baseline as the amount so "$" doesn't float above the digits in the
   modal's refund rows. Scoped to .wc-cancel-meta so it outranks the blanket
   ".wc-cancel-approved span { display:block }" rule inside the Approved banner. */
.wcc-modal .wc-cancel-meta .woocommerce-Price-currencySymbol{
    display: inline;
    vertical-align: baseline;
    font-size: 1em;
}
/* Same normalisation for the wc_price() wrapper span (.woocommerce-Price-amount) so the
   whole price sits on one clean baseline inside the modal. */
.wcc-modal .wc-cancel-meta .woocommerce-Price-amount{
    display: inline;
    vertical-align: baseline;
}
.wcc-modal .wc-cancel-refund-method{
    font-style: normal;
    font-size: 12px;
    line-height: 1.4;
    vertical-align: baseline;
    color: #2e7d32;
    opacity: .8;
}
/* Decision date row inside Approved/Declined banners (partial + full request detail popups).
   High specificity outranks the blanket ".wc-cancel-approved/declined span" display:block. */
.wcc-modal .wc-cancel-meta.wc-cancel-approved .wc-cancel-decision-date,
.wcc-modal .wc-cancel-meta.wc-cancel-declined .wc-cancel-decision-date{
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid;
}
.wcc-modal .wc-cancel-meta.wc-cancel-approved .wc-cancel-decision-date{
    border-top-color: rgba(46,125,50,.25);
}
.wcc-modal .wc-cancel-meta.wc-cancel-declined .wc-cancel-decision-date{
    border-top-color: rgba(198,40,40,.25);
}
.wcc-modal .wc-cancel-meta.wc-cancel-approved .wc-cancel-decision-date label,
.wcc-modal .wc-cancel-meta.wc-cancel-declined .wc-cancel-decision-date label{
    min-width: 0;
    margin: 0;
    font-weight: 600;
    color: inherit;
}
.wcc-modal span.wc-cancel-approved-icon:before,
.wcc-modal span.wc-cancel-declined-icon:before{
    font-family: "wcc-font" !important;
    speak: none;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    margin: 0 6px 0 0;
    font-size: 14px;
}
.wcc-modal span.wc-cancel-approved-icon:before{
    content: "\62";
    color: #2e7d32;
}
.wcc-modal span.wc-cancel-declined-icon:before{
    content: "\63";
    color: #c62828;
}

/* Success / error notices rendered directly in the popup body */
.wcc-modal .wcc_sucess,
.wcc-modal .wcc_error{
    display: block;
    margin: 6px 0;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}
.wcc-modal .wcc_sucess{
    color: #1b5e20;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}
.wcc-modal .wcc_error{
    color: #b71c1c;
    background: #fdecea;
    border: 1px solid #f5c6cb;
}

/* ============================================================
 * Partial cancellation popup styles (merged from partial.css)
 * ============================================================ */
/* Partial cancellation — popup form (scoped under .wcc-modal so it is theme-independent) */
.wcc-modal .wcc-partial-items{
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0 12px;
    font-size: 14px;
}
.wcc-modal .wcc-partial-items th,
.wcc-modal .wcc-partial-items td{
    border: 1px solid #e2e2e2;
    padding: 8px 10px;
    text-align: left;
    color: #333;
}
.wcc-modal .wcc-partial-items thead th{
    background: #f7f7f7;
    font-weight: 600;
    color: #23282d;
}
.wcc-modal .wcc-partial-items tbody tr:nth-child(even) td{
    background: #fafafa;
}
.wcc-modal .wcc-partial-items td.wcc-partial-avail{
    text-align: center;
}
.wcc-modal .wcc-partial-items td.wcc-partial-qty-cell{
    text-align: center;
}
.wcc-modal .wcc-partial-items input.wcc-partial-qty{
    width: 70px;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px 8px;
    text-align: center;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: #333;
}
.wcc-modal .wcc-partial-items input.wcc-partial-qty:focus{
    border-color: #2c2c2c;
    outline: none;
    box-shadow: 0 0 0 1px #2c2c2c;
}

/* Shared cancel/partial form fields inside the popup */
.wcc-modal .wc-cancel-note{
    padding: 4px 0 8px;
    font-size: 15px;
    font-weight: 400;
    color: #555;
}
.wcc-modal .wc-cancel-note > span{
    font-size: 16px;
    color: #d33;
    vertical-align: top;
    padding-right: 5px;
    font-weight: 600;
}
.wcc-modal .wc-cancel-reasons-head{
    font-size: 15px;
    font-weight: 600;
    color: #23282d;
    margin: 10px 0 6px;
}
.wcc-modal ul.wc-cancel-reasons{
    list-style: none;
    margin: 0;
    padding: 0;
}
.wcc-modal ul.wc-cancel-reasons li{
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wcc-modal ul.wc-cancel-reasons li input[type="radio"]{
    margin: 0;
    accent-color: #2c2c2c;
}
.wcc-modal ul.wc-cancel-reasons li label{
    font-size: 14px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
}
.wcc-modal .wc-cancel-reason-text,
.wcc-modal .wc-cancel-txt-main{
    margin: 10px 0;
}
.wcc-modal .wc-cancel-reason-txt textarea{
    width: 100%;
    min-height: 90px;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    background: #fff;
    color: #333;
}
.wcc-modal .wc-cancel-reason-txt textarea:focus{
    border-color: #2c2c2c;
    outline: none;
    box-shadow: 0 0 0 1px #2c2c2c;
}

/* Cancellation-type choice popup */
.wcc-modal .wcc-choice{
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wcc-modal button.wcc-choice-opt{
    display: block;
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    text-align: left;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}
.wcc-modal button.wcc-choice-opt:hover{
    border-color: #2c2c2c;
    background: #f0f0f0;
}
.wcc-modal button.wcc-choice-opt:focus-visible{
    outline: 2px solid #2c2c2c;
    outline-offset: 1px;
}
.wcc-modal .wcc-choice-title{
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #23282d;
}
.wcc-modal .wcc-choice-desc{
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* Admin approval popup — refund methods + status badges (admin context) */
.wc-cancel-refund-methods{
    margin: 10px 0;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #e2e2e2;
}
.wc-cancel-refund-methods > label{
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}
.wc-cancel-refund-radio{
    display: block;
    margin: 4px 0;
}
.wc-cancel-partial-status{
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
}
.wc-cancel-partial-status.pending{
    background: #dba617;
}
.wc-cancel-partial-status.approved{
    background: #2e7d32;
}
.wc-cancel-partial-status.declined{
    background: #c62828;
}
.wc-cancel-partial-items-summary{
    font-size: 12px;
    color: #555;
}
.wc-cancel-qty-meta{
    font-size: 12px;
    color: #666;
    font-weight: 400;
}
.wcc-partial-heading h3{
    margin: 0;
    padding: 8px 0 0;
    color: #23282d;
}
.wcc-modal .wc-cancel-meta .wc-cancel-refund-gateway{display:flex;align-items:center;margin-top:6px;margin-bottom:6px;}
.wcc-modal .wc-cancel-meta .wc-cancel-refund-gateway label{margin-right:8px;color:var(--wc-cancel-text-secondary, #666);font-weight:400;}
.wcc-modal .wc-cancel-meta .wc-cancel-refund-gateway span{color:var(--wc-cancel-text, #222);font-weight:500;}
.wcc-modal .wc-cancel-meta .wc-cancel-refund-txn{display:flex;align-items:center;margin-top:6px;margin-bottom:6px;}
.wcc-modal .wc-cancel-meta .wc-cancel-refund-txn label{margin-right:8px;color:var(--wc-cancel-text-secondary, #666);font-weight:400;}
.wcc-modal .wc-cancel-meta .wc-cancel-refund-txn strong{color:var(--wc-cancel-text, #222);font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Monaco,monospace;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
