/* Stratevera Recruitment: styles for the parts shared by the forms and the dashboard */

/* Formatted job descriptions */
.desc-h { font-weight: 700; margin: 14px 0 6px; color: var(--text); }
.desc-h:first-child { margin-top: 0; }
ul.desc-list { margin: 0 0 10px; padding-left: 22px; }
ul.desc-list li { margin-bottom: 4px; }

/* The editor */
.rt { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); overflow: hidden; }
.rt-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rt-btn { min-width: 38px; min-height: 34px; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.rt-btn:hover { border-color: var(--gold); }
.rt-btn[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.rt-bold { font-weight: 800; }
.rt-italic { font-style: italic; font-family: var(--serif, Georgia, serif); }
.rt-underline { text-decoration: underline; }
.rt-editor { min-height: 160px; max-height: 420px; overflow-y: auto; padding: 12px 14px 12px 34px; outline: none; color: var(--text); line-height: 1.55; }
.rt-editor:focus { box-shadow: inset 0 0 0 2px var(--gold); }
.rt-editor > div { position: relative; margin: 0 0 4px; min-height: 1.55em; }
.rt-editor > div[data-t="b"]::before { content: "•"; position: absolute; left: -16px; top: 0; color: var(--gold-bright); }
.rt-editor > div[data-t="h"] { font-weight: 700; margin: 10px 0 4px -20px; }
.rt-editor > div[data-t="h"]:first-child { margin-top: 0; }
.rt-editor > div[data-t="h"][data-empty]::before { content: "Type the heading here"; color: var(--muted, #8a867c); font-weight: 400; pointer-events: none; }
.rt-hint { margin: 0; padding: 6px 12px 8px; font-size: 13px; color: var(--muted, #8a867c); border-top: 1px solid var(--line); }
.invalid .rt, .rt.invalid { border-color: var(--error, var(--red, #e5735f)); }

/* Shift rows */
.shift-row { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 10px; margin: 0 0 12px; background: var(--surface-2); min-width: 0; }
.shift-row.invalid { border-color: var(--error, var(--red, #e5735f)); }
.shift-legend { font-weight: 700; color: var(--gold-bright); padding: 0 6px; margin: 0; }
.shift-remove { position: absolute; top: 8px; right: 8px; }
.shift-label { font-weight: 600; margin: 4px 0 8px; font-size: 14.5px; }
.shift-times { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; margin: 6px 0 8px; }
.shift-time label { font-size: 14.5px; }
.shift-error { color: var(--error, var(--red, #e5735f)); font-size: 14px; margin: 6px 0 0; }
.shift-error:empty { display: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.chip-check { position: relative; display: inline-flex; margin: 0; font-weight: 600; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: 14px; color: var(--text); background: var(--bg); }
.chip-check input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.chip-check input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.chip-check input:disabled + span { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }
@media (max-width: 480px) { .shift-times { grid-template-columns: 1fr; } }

/* Shift rows shown to candidates and staff */
ul.shift-list { list-style: none; margin: 0; padding: 0; }
ul.shift-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.shift-list li:last-child { border-bottom: 0; }
.shift-days { font-weight: 700; }
.shift-sub { display: block; color: var(--muted); font-size: 14px; }

/* Area picker */
.area-field { position: relative; }
.area-list { position: absolute; left: 0; right: 0; z-index: 30; list-style: none; margin: 4px 0 0; padding: 4px; max-height: 280px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.area-list li { padding: 10px 12px; border-radius: 7px; cursor: pointer; }
.area-list li:hover, .area-list li.active { background: var(--gold); color: var(--gold-ink); }
.area-list li.area-other { border-top: 1px solid var(--line); font-style: italic; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input { flex: 1; min-width: 0; }

/* Holiday periods */
.holiday-row { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; margin: 0 0 10px; background: var(--surface-2); }
.holiday-row .field { margin-bottom: 12px; min-width: 0; }
.holiday-row .holiday-type, .holiday-row .holiday-other { grid-column: 1 / -1; }
.holiday-row .holiday-remove { grid-column: 1 / -1; justify-self: end; margin: -4px 0 10px; }
.holiday-row input[type="date"] { max-width: none; width: 100%; }

/* Availability limited to the employer's days and parts of the day */
.avail-grid { display: grid; grid-template-columns: minmax(64px, auto) repeat(3, 1fr); gap: 8px; align-items: center; }
.avail-grid .ag-head { font-size: 13px; color: var(--muted); text-align: center; font-weight: 600; }
.avail-grid .ag-day { font-weight: 700; }
.avail-grid .ag-none { text-align: center; color: var(--faint, var(--muted)); font-size: 13px; }
.avail-grid .chip-check span { width: 100%; }
.avail-grid .chip-check { display: flex; }

/* v4.5: phone number with a country code picker */
.sv-phone { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.sv-phone > input { flex: 1; min-width: 0; }
.sv-cc { position: relative; flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 92px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer; }
.sv-cc::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .6; }
.sv-cc:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.sv-cc-select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }

/* v4.5: address in parts */
.sv-address { display: grid; gap: 10px; min-width: 0; }
.sv-addr-row { display: grid; gap: 4px; min-width: 0; }
.sv-addr-row > input, .sv-addr-row > select { width: 100%; min-width: 0; }
.sv-addr-label { font-size: 13px; font-weight: 600; color: var(--muted, #8a867c); }
.sv-opt { font-weight: 400; }
.sv-addr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.sv-addr-eircode { grid-template-columns: minmax(0, 220px) auto; align-items: end; column-gap: 12px; }
.sv-addr-eircode .sv-addr-label { grid-column: 1 / -1; }
.sv-addr-eircode input { text-transform: uppercase; letter-spacing: .04em; }
.sv-addr-find { font-size: 13px; align-self: center; }
.sv-address .sv-bad { border-color: var(--error, var(--red, #e5735f)) !important; }
@media (max-width: 520px) { .sv-addr-grid { grid-template-columns: minmax(0, 1fr); } .sv-addr-eircode { grid-template-columns: minmax(0, 1fr); } }

/* v4.5: price, payment terms and signature at the end of employer forms */
.price-terms { border: 1px solid var(--line-strong); border-radius: 14px; padding: 18px 18px 8px; margin: 16px 0; background: var(--surface-2); min-width: 0; }
.pt-title { font-size: 17px; margin: 0 0 10px; }
.pt-title:not(:first-child) { margin-top: 18px; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pt-table th, .pt-table td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; vertical-align: top; }
.pt-table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 12px; }
.pt-table .pt-total th, .pt-table .pt-total td { font-weight: 700; border-bottom: 0; font-size: 16px; padding-top: 12px; }
.pt-small { font-size: 13px; color: var(--muted, #8a867c); margin: 8px 0 0; }
.pt-free { border-left: 3px solid var(--gold); padding: 4px 0 4px 14px; }
.pt-big { font-size: 22px; font-weight: 800; margin: 0 0 4px; color: var(--gold-bright, var(--gold)); }
.pt-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.pt-agree { margin-top: 16px; }
.pt-sign { margin-top: 14px; display: grid; gap: 6px; }
.pt-sign > label { font-weight: 600; }
.pt-sign-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.pt-when { margin: 0; font-size: 13px; color: var(--muted, #8a867c); text-align: right; }
.pt-when strong { color: var(--text); font-variant-numeric: tabular-nums; }
.pt-sig-preview { margin: 0; min-height: 1.6em; font-family: "Brush Script MT", "Segoe Script", "Snell Roundhand", cursive; font-size: 26px; color: var(--text); border-bottom: 1px dashed var(--line-strong); padding-bottom: 2px; overflow-wrap: anywhere; }
@media (max-width: 520px) { .pt-sign-row { grid-template-columns: minmax(0, 1fr); } .pt-when { text-align: left; } }

/* v4.5: suggestion lists are solid and blurred, so their text is easy to read over the page */
.area-list { background: var(--glass-hi, var(--surface, #0E1520)); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); border-color: var(--edge-2, var(--line-strong)); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.area-list li { color: var(--text, #E8EDF3); }
:root[data-theme="light"] .area-list { box-shadow: 0 16px 40px rgba(20, 30, 50, .18); }
