/**
 * The Settings tab: its two desks (returns and tracking), the section index
 * of the returns desk, the reason editor, the rows with fields side by side,
 * the cells of the texts editor and the tables of the tracking desk.
 *
 * Loaded on the Settings tab only, after admin.css (the help icons).
 */

/* The two desks, as section links under the tabs (ul.subsubsub). */
.careback-desks {
	float: none;
	margin: 0 0 12px;
}

/* The index of the returns desk, kept in view while the form scrolls, and the
   headings it links to. */
.careback-index{position:sticky;top:32px;z-index:9;display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:2px 18px;margin:10px 0 18px;padding:10px 14px;background:#fff;border:1px solid #dcdcde;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.06);max-height:34vh;overflow:auto}
.careback-index-group{display:flex;flex-direction:column;min-width:0}
.careback-index-title{padding:2px 0;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#1d2327;text-decoration:none}
.careback-index-link{padding:1px 0;font-size:12px;text-decoration:none}
.careback-index a:hover,.careback-index a:focus{text-decoration:underline}
@media screen and (max-width:782px){.careback-index{top:46px}}
/* Clears the admin bar and the index above the anchor it scrolls to. */
h2.careback-group,h3.careback-section,h4.careback-text-group{scroll-margin-top:160px}
h2.careback-group{margin:34px 0 2px;padding:0 0 6px;border-bottom:2px solid #c3c4c7;font-size:17px}
h2.careback-group:first-of-type{margin-top:12px}
.careback-group-back{float:right;font-size:12px;font-weight:400;text-decoration:none}
h3.careback-section{margin:22px 0 2px;font-size:15px}
h4.careback-text-group{margin:18px 0 4px;font-size:13px}
h3.careback-section:target,h4.careback-text-group:target{margin-left:-8px;padding-left:8px;background:#f0f6fc;box-shadow:-6px 0 0 #2271b1}
.careback-text-index{display:flex;flex-wrap:wrap;gap:4px 14px;margin:10px 0 4px;padding:8px 12px;font-size:12px;background:#f6f7f7;border:1px solid #dcdcde;border-radius:4px}
.careback-text-index a{text-decoration:none}

/* The reason editor. */
.careback-reasons-editor{max-width:900px;margin:0 0 8px}
.careback-reasons-editor th.careback-reason-col-place{width:96px}
.careback-reasons-editor th.careback-reason-col-key{width:210px}
.careback-reasons-editor th.careback-reason-col-flag{width:90px}
.careback-reasons-editor th.careback-reason-col-action{width:80px}
.careback-reasons-editor td{vertical-align:middle}
.careback-reasons-editor .careback-reason-fault,.careback-reasons-editor .careback-reason-used{text-align:center}
.careback-reasons-editor input[readonly]{background:#f6f7f7;color:#50575e}
.careback-reasons-editor .careback-reason-move{white-space:nowrap}
.careback-reasons-editor .careback-reason-handle{color:#8c8f94;cursor:move;vertical-align:middle}
.careback-reasons-editor .careback-reason-position{width:56px;text-align:center}
.careback-reasons-editor tr.careback-reason-dragging{background:#f0f6fc}
.careback-reason-notice{max-width:900px;margin:0 0 12px}

/* Fields set side by side in one row (the timing check, Turnstile's keys). */
.careback-subfields{display:flex;gap:18px;flex-wrap:wrap;margin:8px 0 0}
.careback-subfields label{display:flex;align-items:center;gap:6px}

/* Cell of one editable text: the field keeps the row width and the help icon
   sits beside it. */
.careback-text-cell{display:flex;align-items:center;gap:8px}
.careback-text-cell .careback-tip{flex:0 0 auto}

/* The tracking desk: its group headings and the table of delivery services. */
.careback-track-group{margin:26px 0 4px;padding:0 0 6px;border-bottom:1px solid #dcdcde;font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#50575e}
.careback-track-carriers td{vertical-align:middle}
.careback-track-carriers input[type=text]{max-width:260px}
.careback-track-carriers input[type=url]{width:100%;max-width:520px}

/* Step 6, group 5: the form's rows — a field's own message after a save, a
   note on the chosen page, and the example of an item with its details. */
.careback-field-error{margin:6px 0 0;color:#b32d2e;font-weight:600}
.careback-field-note{margin:6px 0 0;padding:6px 10px;border-left:3px solid #dba617;background:#fcf9e8;max-width:640px}
.careback-item-example{display:flex;width:max-content;max-width:100%;flex-direction:column;margin:8px 0 0;padding:8px 12px;border:1px solid #dcdcde;background:#fff;line-height:1.5}
.careback-item-example .careback-item-meta{font-size:12px;color:#50575e}
.careback-settings input[aria-invalid="true"]{border-color:#b32d2e}

/* Statutory withdrawal on or off (N-80): the two radio buttons, the confirmation
   under them, the state once it is off, the settings folded for the withdrawals
   filed earlier. */
.careback-radio-list label{display:block;margin:0 0 8px}
.careback-radio-list:focus{outline:none}
.careback-panel{margin:10px 0 0;padding:12px 16px 14px;max-width:760px;background:#fff;border:1px solid #dcdcde;border-left:4px solid #dba617}
.careback-panel[hidden]{display:none}
.careback-panel.is-error{border-color:#f0b8b8;border-left-color:#d63638;background:#fcf0f1}
.careback-panel.is-danger{border-left-color:#d63638}
.careback-panel p{margin:6px 0}
.careback-panel .careback-field-error{display:block;margin:6px 0 0 24px}
.careback-confirm-box{display:block;margin-top:10px;font-weight:600}
.careback-list-plain{margin:4px 0 6px 18px;list-style:disc}
.careback-list-plain li{margin:0 0 3px}
.careback-state{display:inline-block;margin:0 4px 4px 0;padding:2px 8px;border-radius:3px;font-weight:600;background:#f0f0f1}
.careback-state.is-off{background:#fcf0f1;color:#8a2424}
.careback-earlier{margin:12px 0 0}
.careback-earlier>summary{cursor:pointer;color:#2271b1;padding:4px 0}

/* When the periods start (N-76): the example, and the note on another status. */
.careback-example{margin:8px 0 0;padding:6px 10px;max-width:640px;background:#f6f7f7;border-left:3px solid #c3c4c7}
.careback-inline-warning{margin:6px 0 0;padding:6px 10px;max-width:640px;background:#fcf9e8;border-left:3px solid #dba617}

/* The official texts under the statutory withdrawal switch (N-114, N-115): each with its version. */
.careback-official-texts-row .careback-official-version{margin:2px 0 14px}

/* Step 6, group 9 (X-04): the shop's extra item details — a field and its
   label per row, the fields of recent orders offered in the field box. */
.careback-item-fields{max-width:640px}
.careback-item-fields td{vertical-align:top}
.careback-item-fields input[type=text]{width:100%}
/* WordPress colours a table's paragraphs; a message keeps its own. */
.careback-item-fields .careback-field-error{color:#b32d2e}
