/* Sitesec — Schedule Adjustment, custom components
 * Loaded only where support/init.php enqueues it. Outside the Vite pipeline on
 * purpose: a theme rebuild cannot overwrite it, and filemtime() versioning in
 * the enqueue cache-busts every edit.
 *
 * Scope: .support_form .sa-sched
 * Everything else (inputs, radios, buttons, step indicator, file upload,
 * confirmation) is inherited from the theme's own support.css via .support_form.
 * Only the two components Gravity Forms cannot express natively live here:
 * the schedule entry builder, and the weekly 7x24 preview grid.
 */
.support_form .sa-sched .section{margin-bottom:30px;}
.support_form .sa-sched .section-label{font-size:13px;font-weight:600;color:var(--muted);margin-bottom:10px;}
.support_form .sa-sched .sub-label{font-size:12px;color:var(--muted);margin-top:8px;}
.support_form .sa-sched .chip{border-width:1px;border-style:solid;border-radius:999px;padding:8px 6px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;min-width:46px;text-align:center;}
.support_form .sa-sched .quick-btn{border:1px solid #d4d4d4;background:#fff;border-radius:8px;padding:7px 12px;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;color:#5b5b5b;}
.support_form .sa-sched .quick-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px;}
.support_form .sa-sched .day-row{display:flex;gap:8px;flex-wrap:wrap;}
.support_form .sa-sched .field-box{background:var(--card);border:1px solid var(--card-line);border-radius:10px;padding:20px;box-sizing:border-box;}
.support_form .sa-sched .row-2{display:flex;gap:20px;flex-wrap:wrap;}
.support_form .sa-sched .row-2 > div{flex:1;min-width:150px;}
.support_form .sa-sched .field-mini-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--muted);margin-bottom:8px;}
.support_form .sa-sched .time-input{border:none;border-bottom:1px solid var(--line);background:transparent;font-size:15px;padding:8px 0;font-family:inherit;color:var(--ink);width:100%;box-sizing:border-box;}
.support_form .sa-sched .add-entry-btn{background:var(--ink);color:#fff;border:none;border-radius:999px;padding:11px 22px;font-size:14px;font-weight:600;cursor:pointer;font-family:inherit;margin-top:16px;}
.support_form .sa-sched .clear-btn{background:none;border:none;color:var(--muted);font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;text-decoration:underline;}
.support_form .sa-sched .entries-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px;}
.support_form .sa-sched .entry-row{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid var(--card-line);}
.support_form .sa-sched .entry-row:last-child{border-bottom:none;}
.support_form .sa-sched .entry-summary{font-size:14px;color:var(--ink);}
.support_form .sa-sched .entry-action{font-size:13px;font-weight:700;margin-left:10px;}
.support_form .sa-sched .remove-btn{background:none;border:none;color:#9a9a9a;cursor:pointer;font-size:18px;line-height:1;padding:4px 8px;}
.support_form .sa-sched .empty-note{font-size:13px;color:var(--muted);padding:6px 0;}
.support_form .sa-sched .camera-chip{display:inline-flex;align-items:center;gap:6px;background:#ffffff;border:1px solid #d4d4d4;border-radius:999px;padding:7px 8px 7px 14px;font-size:13px;font-weight:600;color:#3f3f3f;}
.support_form .sa-sched .camera-chip button{background:none;border:none;color:#9a9a9a;cursor:pointer;font-size:15px;line-height:1;padding:2px 4px;font-family:inherit;}
.support_form .sa-sched .week-ticks{display:flex;padding-left:46px;justify-content:space-between;font-size:11px;color:var(--muted);margin-bottom:6px;}
.support_form .sa-sched .week-row{display:flex;align-items:center;gap:12px;margin-bottom:6px;}
.support_form .sa-sched .week-label{width:34px;font-size:12px;font-weight:700;color:var(--muted);flex-shrink:0;}
.support_form .sa-sched .week-bar{flex:1;display:grid;grid-template-columns:repeat(24,1fr);gap:1px;height:20px;border-radius:4px;overflow:hidden;}
.support_form .sa-sched .hour-cell{height:100%;}
.support_form .sa-sched .legend{display:flex;gap:16px;margin-top:14px;font-size:12px;color:var(--muted);}
.support_form .sa-sched .legend-swatch{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;vertical-align:middle;}
.support_form .sa-sched .summary-list{margin-top:22px;}
.support_form .sa-sched .summary-row{display:flex;justify-content:space-between;font-size:13px;padding:7px 0;border-bottom:1px solid var(--card-line);}
.support_form .sa-sched .summary-row:last-child{border-bottom:none;}

/* Grid colours come from the mockup's palette, kept local to this component. */
.support_form .sa-sched{--card:#f6f6f6;--card-line:#dcdcdc;--muted:#6e6e6e;--line:#c7c7c7;--ink:#161616;--armed:#f4bc1a;--unarmed:#9a9aa2;}

/* --- Tab selector: General Support / Schedule Adjustment ---------------------
 * The theme DOES have tab styles (src/components/tabs/*.scss) but they are only
 * imported by modules/components_page/components.scss, so they never load on a
 * normal page - which is why Elementor's default left the active title white on
 * a near-white panel (#fff on #f3f4f6), i.e. invisible.
 *
 * None of the theme's variants is a brand fit either: the base is an underline
 * using --COLORS-PRIMARY, undefined here and falling back to #2CC6FA (blue);
 * style_2 is #23262a; horizontal is white-on-grey.
 *
 * So these tabs borrow the site's own BUTTON idiom, measured off Request
 * Pricing, Login and .gform_next_button:
 *     primary    #FFC600 bg, #000 text, 1px #FFC600, radius 60px, 16px/600
 *     secondary  transparent bg, #000 text, 1px #000, same metrics
 * Inactive tab = secondary button. Active tab = primary button.
 *
 * NOTE ON SELECTORS: Elementor's own defaults (radius 0, border none,
 * padding 15px 35px) beat a plain .e-n-tab-title rule. The long chain below is
 * the same specificity pattern the theme's own tabs/*.scss uses to win.
 * Colour still goes through Elementor's custom properties, which it honours.
 *
 * One deliberate deviation: vertical padding 5px -> 10px. The site's buttons sit
 * at ~32px tall, tight for what is primary navigation here; this gives ~42px
 * without changing the visual language. */
.e-n-tabs{
	--n-tabs-gap:12px;
	--n-tabs-title-color-normal:#000;
	--n-tabs-title-color-hover:#000;
	--n-tabs-title-color-active:#000;
	--n-tabs-title-background-color-normal:transparent;
	--n-tabs-title-background-color-hover:#f1f2f3;
	--n-tabs-title-background-color-active:#ffc600;
}
.elementor .elementor-element.elementor-widget-n-tabs > .elementor-widget-container > .e-n-tabs > .e-n-tabs-heading{
	gap:12px;
	justify-content:flex-start;
}
.elementor .elementor-element.elementor-widget-n-tabs > .elementor-widget-container > .e-n-tabs > .e-n-tabs-heading .e-n-tab-title{
	background-color:transparent;
	color:#000;
	border:1px solid #000;
	border-radius:60px;
	padding:10px 24px;
	font-family:"Nunito Sans",sans-serif;
	font-size:16px;
	font-weight:600;
	transition:background-color .15s ease,border-color .15s ease,color .15s ease;
}
.elementor .elementor-element.elementor-widget-n-tabs > .elementor-widget-container > .e-n-tabs > .e-n-tabs-heading .e-n-tab-title .e-n-tab-title-text{
	color:inherit; font-size:inherit; font-weight:inherit;
}
.elementor .elementor-element.elementor-widget-n-tabs > .elementor-widget-container > .e-n-tabs > .e-n-tabs-heading .e-n-tab-title[aria-selected="false"]:hover{
	background-color:#f1f2f3;
}
.elementor .elementor-element.elementor-widget-n-tabs > .elementor-widget-container > .e-n-tabs > .e-n-tabs-heading .e-n-tab-title[aria-selected="true"]{
	background-color:#ffc600;
	border-color:#ffc600;
	color:#000;
}
.elementor .elementor-element.elementor-widget-n-tabs > .elementor-widget-container > .e-n-tabs > .e-n-tabs-heading .e-n-tab-title[aria-selected="true"] .e-n-tab-title-text{
	color:#000;
}

@media(max-width:767px){
	.elementor .elementor-element.elementor-widget-n-tabs > .elementor-widget-container > .e-n-tabs > .e-n-tabs-heading .e-n-tab-title{
		padding:10px 18px; font-size:15px;
	}
}

/* --- Radio choice labels: parity with the live /support/ page ---------------
 * support.css sets `.support_form .gfield_radio .gchoice label{font-size:36px}`
 * and on /support/ (an elementor_canvas template) that wins - measured 36px on
 * both the State row (02 Site) and System power (03 System).
 * On a standard page template it does NOT win: Gravity Forms' own
 * .gform-field-label sizing takes over and the labels drop to 15px, while the
 * .gchoice parent stays 36px - so the row height is right but the text is tiny.
 * This restores parity. Measured, not guessed: 36px is what the live support
 * form renders today, including the horizontal State row. */
.support_form .gfield_radio .gchoice label.gform-field-label{
	font-size:36px;
	line-height:1.2;
}

/* --- Select fields -----------------------------------------------------------
 * support.css styles text/email/textarea inputs (border-bottom, 36px) but not
 * <select>, so the Reason and Preset dropdowns on step 4 render as default
 * browser boxes and look foreign next to everything else on the form.
 * Matched to the same underline idiom, with a chevron drawn in rather than the
 * native arrow (appearance:none removes it). */
.support_form .gform_wrapper .gfield select{
	appearance:none;
	-webkit-appearance:none;
	width:100%;
	border:none;
	border-bottom:1px solid rgba(0,0,0,.4);
	border-radius:0;
	background-color:transparent;
	background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1 1l7 7 7-7' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
	background-repeat:no-repeat;
	background-position:right 4px center;
	padding:0 32px 6px 0;
	font-family:inherit;
	font-size:20px;
	line-height:1.2;
	color:#000;
	transition:border-color .1s ease;
}
.support_form .gform_wrapper .gfield select:focus{ border-color:#000; outline:none; }

@media(max-width:767px){
	.support_form .gform_wrapper .gfield select{ font-size:18px; }
}

/* --- Date fields: underline parity -------------------------------------------
 * GF renders a date field as a FLEX container holding the input plus a calendar
 * toggle button. support.css puts the border-bottom on the input, so the input
 * shrinks by the width of the button (~33px) and its underline stops short of
 * the field edge - visibly inconsistent with the text inputs and the radio rows
 * either side of it, where the line runs the full width.
 *
 * Moving the border to the container makes the line span the whole field with
 * the calendar icon sitting ON it, exactly like the radio circles do. */
.support_form .gform_wrapper .gfield--type-date .ginput_container_date{
	border-bottom:1px solid rgba(0,0,0,.4);
	align-items:center;
	transition:border-color .1s ease;
}
.support_form .gform_wrapper .gfield--type-date .ginput_container_date:focus-within{
	border-color:#000;
}
.support_form .gform_wrapper .gfield--type-date .ginput_container_date input.datepicker{
	border-bottom:none;
	flex:1 1 auto;
	min-width:0;
}
.support_form .gform_wrapper .gfield--type-date .ginput_container_date input.datepicker:focus{
	border-bottom:none;
}
.support_form .gform_wrapper .gfield--type-date .gform-datepicker-toggle{
	flex:0 0 auto;
	background:none;
	border:none;
	padding:0 0 0 8px;
}

/* --- .radio-style2 : button-style radios -------------------------------------
 * Opt-in per field: add the CSS class "radio-style2" to a Gravity Forms radio
 * field (Appearance > Custom CSS Class) and its choices render as pill buttons
 * in the Sitesec idiom instead of the support form's label + circle rows.
 *
 * THE PILL IS THE <label>, NOT THE .gchoice. This matters:
 * only a <label> toggles its radio. Earlier versions styled .gchoice as the
 * pill, which left the padding ring - and then the 1px border itself - as
 * non-label area, so clicking near or on the edge did nothing (reported twice:
 * "TAS near the border doesn't select"). Putting the border, radius,
 * background and padding on the label makes every pixel of the pill, border
 * included, a click target. Centring then comes for free, because the label is
 * the box rather than text floating inside a bigger one.
 *
 * .gchoice is reduced to a transparent wrapper: support.css gives it a bottom
 * border, 36px type, a 10px gap and opacity .4, all of which are unset here.
 *
 * The native radio stays focusable and announced; it is only visually hidden.
 * Unselected = outlined secondary (Login). Selected = filled #FFC600 primary. */
.support_form .radio-style2 .gfield_radio{
	flex-direction:row;
	flex-wrap:wrap;
	gap:12px;
}
/* Wrapper only - every visual property is reset off it. */
.support_form .radio-style2 .gfield_radio .gchoice{
	position:relative;
	display:inline-flex;
	align-items:stretch;
	gap:0;
	margin:0;
	padding:0;
	border:none;
	border-bottom:none;
	border-radius:0;
	background:none;
	opacity:1;
	overflow:visible;
	font-size:16px;
}
/* Visually hidden, still focusable and still announced. */
.support_form .radio-style2 .gfield_radio .gchoice .gfield-choice-input{
	position:absolute;
	width:1px;
	height:1px;
	margin:0;
	padding:0;
	opacity:0;
	pointer-events:none;
}
/* THE BUTTON. */
.support_form .radio-style2 .gfield_radio .gchoice label.gform-field-label{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	flex:0 0 auto;
	box-sizing:border-box;
	min-width:96px;
	margin:0;
	padding:11px 24px;
	border:1px solid #000;
	border-radius:60px;
	background-color:transparent;
	font-size:16px;
	font-weight:600;
	line-height:1.2;
	color:#000;
	text-align:center;
	white-space:nowrap;
	cursor:pointer;
	transition:background-color .15s ease,border-color .15s ease;
}
.support_form .radio-style2 .gfield_radio .gchoice label.gform-field-label:hover{
	background-color:#f1f2f3;
}
.support_form .radio-style2 .gfield_radio .gchoice:has(input:checked) label.gform-field-label{
	background-color:#ffc600;
	border-color:#ffc600;
}
.support_form .radio-style2 .gfield_radio .gchoice:has(input:focus-visible) label.gform-field-label{
	outline:2px solid #000;
	outline-offset:2px;
}

@media(max-width:767px){
	.support_form .radio-style2 .gfield_radio .gchoice label.gform-field-label{
		min-width:72px;
		padding:11px 18px;
		font-size:15px;
	}
}
