/* This file contains the styles used in the Popup Builder Admin Page */


/* Page Styling ---------------------- Start */

/* Background of the Popup Builder Admin Page */
#wpwrap,
.striped > tbody > :nth-child(odd) {
	background-color: #f8fafc;
}

/* Page Styling ------------------------ End */

/* Toggle Styling -------------------- Start */

/* Toggle Styling */
.spectra-popup-builder__switch {
	position: relative;
	width: 42px;
	height: 22px;
	padding: 2px;
	margin: inherit;
	cursor: pointer;
	border: none;
	border-radius: 100px;
	box-sizing: border-box;
	background: #64748b;
	opacity: 0.7;
	transition: background 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toggle Disabled Styling */
.spectra-popup-builder__switch.spectra-popup-builder__switch--disabled {
	pointer-events: none;
	cursor: not-allowed;
	background: #e2e8f0;
}

/* Toggle Dot Styling */
.spectra-popup-builder__switch > span {
	pointer-events: none;
	-js-display: flex;
	display: flex;
	width: 16px;
	height: 16px;
	background: #fff;
	box-shadow: 0 1px 2px 0 #0000000f, 0 1px 3px 0 #0000001a;
	border-radius: inherit;
	transform: translate(2px, 1px);
	transition: background 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toggle Dot Styling - RTL */
.spectra-popup-builder__switch.is-rtl-toggle > span {
	transform: translate(-2px, 1px);
}

/* Toggle Active Styling */
.spectra-popup-builder__switch.spectra-popup-builder__switch--active {
	background: #007cba;
	opacity: 1;
}

/* Toggle Active Dot Styling */
.spectra-popup-builder__switch.spectra-popup-builder__switch--active span {
	transform: translate(20px, 1px);
}

/* Toggle Active Dot Styling - RTL */
.spectra-popup-builder__switch.spectra-popup-builder__switch--active.is-rtl-toggle span {
	transform: translate(-20px, 1px);
}

/* Toggle Styling ---------------------- End */

/* Columns Styling ------------------- Start */

/* Style for all the Headings in the Admin Table */
/* stylelint-disable selector-id-pattern */
.post-type-spectra-popup .wp-list-table #spectra_popup_type,
.post-type-spectra-popup .wp-list-table #author,
.post-type-spectra-popup .wp-list-table #spectra_popup_toggle {
	width: 150px;
}

.post-type-spectra-popup .wp-list-table #spectra_popup_trigger {
	width: 200px;
}
/* stylelint-enable selector-id-pattern */

/* Style for the Switch Column and Row in the Admin Table */
th.column-spectra_popup_toggle,
td.column-spectra_popup_toggle {
	text-align: center;
}

/* Style for the Switch Element in the Admin Table */
td.spectra_popup_toggle.column-spectra_popup_toggle .spectra-popup-builder__switch {
	margin: 0 auto;
}

/* Columns Styling --------------------- End */


/* Focus Management Styles - WCAG 2.1 Compliance */
/* Added for keyboard accessibility and screen reader support */

/* Button Focus Styles */
.hvac-button:focus,
.hvac-content .button:focus,
.hvac-content button:focus,
.hvac-content input[type="submit"]:focus,
.hvac-email-submit:focus,
.hvac-filter-submit:focus,
.hvac-certificate-actions button:focus,
.hvac-certificate-actions a:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.2);
    border-radius: 4px;
}

/* Input Focus Styles */
.hvac-form-input:focus,
.hvac-content input[type="text"]:focus,
.hvac-content input[type="email"]:focus,
.hvac-content input[type="password"]:focus,
.hvac-content input[type="url"]:focus,
.hvac-content textarea:focus,
.hvac-content select:focus,
.hvac-email-form-row input:focus,
.hvac-email-form-row textarea:focus,
.hvac-filter-group input:focus,
.hvac-filter-group select:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    border-color: #005fcc;
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.2);
}

/* Link Focus Styles */
.hvac-content a:focus,
.hvac-event-link:focus,
.hvac-certificate-link:focus,
.hvac-attendee-profile-icon:focus,
.hvac-dashboard-nav a:focus,
.hvac-email-navigation a:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    text-decoration: underline;
    background-color: rgba(0, 95, 204, 0.1);
    border-radius: 2px;
}

/* Interactive Element Focus Styles */
.hvac-attendee-checkbox:focus,
.hvac-select-all-container input[type="checkbox"]:focus,
.hvac-modal-close:focus,
.hvac-certificate-table tr:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.2);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hvac-content *:focus {
        outline: 3px solid #000000;
        outline-offset: 2px;
        background-color: #ffff00;
        color: #000000;
    }
}

/* Focus-visible polyfill support */

/* Reset focus for mouse users while preserving keyboard accessibility */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
    box-shadow: none;
}

/* Ensure focus is visible for keyboard users */
.js-focus-visible .focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}
