/**
 * The Requests tab: the toolbar above the list, the manual entry, the request
 * card and the confirmation step of a status change.
 *
 * Loaded on the Requests tab only, after admin.css (the help icons).
 */

/* The toolbar above the list. */
/* The core rule fixes .tablenav at 30px and clips it; the row here
   wraps and carries an absolutely positioned menu. */
.careback-tablenav{height:auto;overflow:visible;margin:0 0 6px}
.careback-toolbar{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;margin:0}
.careback-toolbar-main{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:1 1 auto}
.careback-toolbar .search-box input{min-width:220px}
.careback-toolbar-clear{margin-left:2px}
/* WordPress floats every select inside .tablenav to the left, which put the
   label after the control it names. */
.careback-sort{display:inline-flex;align-items:center;gap:6px}
.careback-sort select{float:none;margin:0}
.careback-sort label{color:#50575e;white-space:nowrap}
/* Right edge of the table, i.e. above the Status column, on one line
   and on its own line once the row wraps. */
.careback-status-filter{position:relative;flex:0 0 auto;margin-left:auto}
.careback-status-toggle{display:inline-flex;align-items:center;gap:4px;cursor:pointer;list-style:none}
.careback-status-toggle::-webkit-details-marker{display:none}
.careback-status-filter[open] .careback-status-toggle .dashicons-arrow-down-alt2{transform:rotate(180deg)}
.careback-status-menu{position:absolute;z-index:10;top:calc(100% + 4px);right:0;min-width:190px;max-height:280px;overflow:auto;background:#fff;border:1px solid #c3c4c7;box-shadow:0 2px 6px rgba(0,0,0,.12);padding:8px}
.careback-status-menu label{display:flex;align-items:center;gap:8px;padding:5px 6px;white-space:nowrap;cursor:pointer}
.careback-status-menu label:hover{background:#f6f7f7}
.careback-status-menu-apply{margin:6px 0 0;padding:6px 6px 0;border-top:1px solid #f0f0f1}

/* Recording a declaration that came by email, post or phone. */
.careback-manual{margin:0 0 18px}
.careback-manual-silent{margin:10px 0 0;padding:8px 12px;border-left:3px solid #dba617;background:#fcf9e8}
.careback-manual-form{margin:12px 0 0;padding:4px 18px 10px;border:1px solid #dcdcde;border-radius:6px;background:#fff;max-width:760px}

/* The row toggle and the request card. */
.careback-requests-table .careback-col-toggle{width:32px;text-align:center}
.careback-toggle{cursor:pointer;padding:0;line-height:1}
.careback-toggle .dashicons{transition:transform .15s ease}
.careback-toggle[aria-expanded="true"] .dashicons{transform:rotate(90deg)}
.careback-detail{padding:14px 8px}
.careback-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px}
.careback-detail-block h4{margin:0 0 6px}
.careback-detail-items{margin:0 0 8px;padding-left:18px}
.careback-detail-comment{white-space:pre-wrap;background:#fff;border:1px solid #e0e0e0;padding:8px 10px;border-radius:3px}
.careback-detail-history{margin-top:16px;border-top:1px solid #e6e6e6;padding-top:12px}
.careback-detail-history ul{margin:0}
.careback-detail-history li{margin:2px 0}
.careback-hist-time{color:#787c82;margin-right:8px;font-variant-numeric:tabular-nums}
.careback-hist-by{color:#787c82;margin-left:6px}
.careback-hist-note{color:#2c3338}
.careback-type-flag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:9px;font-size:11px;white-space:nowrap}
.careback-type-flag.is-statutory{background:#f0f6fc;color:#0a4b78;border:1px solid #a7c7e7}
.careback-fault-flag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:9px;background:#fcf0f1;color:#8a2424;font-size:11px;white-space:nowrap}
.careback-fault-note{margin:8px 0 0;padding:8px 10px;border-left:3px solid #d63638;background:#fcf0f1}
.careback-supersedes-flag,.careback-superseded-flag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:9px;background:#fcf9e8;color:#7a5a00;font-size:11px;white-space:nowrap}
.careback-overlap-note{margin:8px 0 0;padding:8px 10px;border-left:3px solid #dba617;background:#fcf9e8}
.careback-filed-flag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:9px;font-size:11px;white-space:nowrap}
.careback-filed-flag.is-late{background:#fcf0f1;color:#8a2424}
.careback-filed-flag.is-unknown{background:#f0f0f1;color:#50575e}
.careback-filed-note{margin:8px 0 0;padding:8px 10px;border-left:3px solid #00a32a;background:#f6f7f7}
.careback-filed-note.is-late{border-left-color:#d63638;background:#fcf0f1}
.careback-filed-note.is-unknown{border-left-color:#dba617}
.careback-arrival{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}
.careback-arrival[hidden]{display:none}
.careback-arrival-form{margin:10px 0 0;padding-top:8px;border-top:1px solid #f0f0f1}
.careback-arrival-undo summary{cursor:pointer;color:#b32d2e}
.careback-carriage-note{margin:8px 0;padding:8px 10px;border-left:3px solid #dba617;background:#fcf9e8}

/* The confirmation step of a status change. */
.careback-confirm{margin:14px 0 18px;padding:12px 16px 4px;border:1px solid #dba617;border-left-width:4px;border-radius:4px;background:#fcf9e8;max-width:760px}
.careback-confirm h2{margin:0 0 8px;font-size:15px}
.careback-confirm-grounds{margin:0 0 6px;padding:8px 12px 2px;border:1px solid #dcdcde;border-radius:4px;background:#fff}
.careback-confirm-grounds legend{padding:0 4px;font-weight:600}
.careback-confirm-grounds p{margin:6px 0}
.careback-confirm-ref{margin-left:24px;color:#50575e}

/* N-16: each detail of a variation on a line of its own under the item name;
   N-12: the consent with the returns policy given on the form. */
.careback-detail-items .careback-item-meta{display:block;padding-left:12px;font-size:12px;color:#50575e}
.careback-policy-accepted{margin:6px 0;color:#1d2327}
