/**
 * Admin styles for Evenzo Events Manager for WooCommerce.
 *
 * These styles extend WordPress and WooCommerce native styles.
 * We avoid custom styling and use native components where possible.
 *
 * @package EventsAndTicketsForWooCommerce
 * @since   1.0.0
 */

/* ==========================================================================
   Dashboard Styles
   ========================================================================== */

.emwc-dashboard-header {
	margin-bottom: 0;
}

.emwc-dashboard-header h1 {
	display: inline-block;
	margin-right: 5px;
}

.emwc-dashboard-header .page-title-action {
	margin-left: 4px;
}

/* Stats Cards */
.emwc-dashboard-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin: 20px 0;
}

.emwc-dashboard-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 12px 15px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 0;
	min-width: 0;
}

.emwc-card-icon {
	font-size: 24px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #2271b1;
	background: rgba(34, 113, 177, 0.08);
	border-radius: 6px;
	flex-shrink: 0;
}

.emwc-card-data {
	display: flex;
	flex-direction: column;
}

.emwc-card-number {
	font-size: 22px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.2;
}

.emwc-card-label {
	font-size: 12px;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Dashboard Row */
.emwc-dashboard-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 20px;
}

/* Dashboard Box */
.emwc-dashboard-box {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px;
	flex: 1;
	min-width: 300px;
}

.emwc-dashboard-box h2 {
	margin: 0 0 15px 0;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.emwc-dashboard-box table.widefat {
	border: none;
	margin: 0 -20px;
	width: calc(100% + 40px);
}

.emwc-dashboard-box table.widefat th,
.emwc-dashboard-box table.widefat td {
	padding: 10px 15px;
}

.emwc-dashboard-box table.widefat thead th {
	background: #f6f7f7;
	font-weight: 600;
}

.emwc-no-items {
	color: #646970;
	font-style: italic;
	margin: 0;
	padding: 20px 0;
	text-align: center;
}

.emwc-view-all {
	margin: 15px 0 0 0;
	padding-top: 15px;
	border-top: 1px solid #c3c4c7;
	text-align: right;
}

.emwc-view-all a {
	text-decoration: none;
}

/* Chart Box */
.emwc-dashboard-chart {
	width: 100%;
}

.emwc-dashboard-chart canvas {
	max-width: 100%;
	max-height: 250px;
}

/* Lists Row */
.emwc-dashboard-lists .emwc-dashboard-box {
	flex: 1;
	min-width: 350px;
}

/* Deprecated - kept for backwards compatibility */
.emwc-dashboard-widgets {
	margin-top: 20px;
}

.emwc-stat-number {
	font-size: 32px;
	font-weight: 600;
	color: #2271b1;
	margin: 0;
}

.emwc-dashboard-section {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 20px;
}

.emwc-dashboard-section h2 {
	margin-top: 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #c3c4c7;
}

.emwc-dashboard-section ol {
	margin-left: 20px;
}

.emwc-dashboard-section li {
	margin-bottom: 8px;
}

/* ==========================================================================
   Settings Page Styles - WooCommerce Style
   ========================================================================== */

/* Main wrapper - matches WooCommerce */
.emwc-settings-wrap {
	margin: 0;
}

/* Header area with white background - full width like WooCommerce */
.emwc-settings-wrap .emwc-settings-header {
	background: #fff;
	margin: -10px -20px 1em -20px;
	padding: 0;
	border-bottom: 1px solid #c3c4c7;
	width: calc(100% + 40px);
}

.emwc-settings-wrap .emwc-settings-header h1 {
	margin: 0;
	padding: 20px 20px 0;
	font-size: 23px;
	font-weight: 400;
	line-height: 1.3;
}

/* Tab wrapper - matches WooCommerce exactly */
.emwc-settings-wrap .nav-tab-wrapper.woo-nav-tab-wrapper {
	margin: 0;
	padding: 16px 20px 0;
	background: transparent;
	border-bottom: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}

.emwc-settings-wrap .nav-tab {
	padding: 0 0 10px 0;
	margin: 0 16px 0 0;
	border: 0;
	background: 0 0;
	font-weight: 500;
	font-size: 14px;
	line-height: 20px;
	color: #505050;
	text-decoration: none;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: color 0.1s ease-in-out, border-color 0.1s ease-in-out;
}

.emwc-settings-wrap .nav-tab:hover,
.emwc-settings-wrap .nav-tab:focus {
	background: transparent;
	color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
	outline: none;
}

.emwc-settings-wrap .nav-tab-active,
.emwc-settings-wrap .nav-tab-active:hover,
.emwc-settings-wrap .nav-tab-active:focus {
	background: transparent;
	color: #070707;
	border-bottom: 2px solid var(--wp-admin-theme-color, #3858e9);
	font-weight: 500;
}

/* Form table - matches WooCommerce settings */
.emwc-settings-wrap table.form-table {
	margin: 0;
	position: relative;
	table-layout: fixed;
	width: 100%;
}

.emwc-settings-wrap table.form-table th {
	position: relative;
	padding-right: 24px;
	width: 200px;
	vertical-align: top;
	padding: 20px 10px 20px 0;
}

.emwc-settings-wrap table.form-table th label {
	position: relative;
	display: block;
	font-weight: 400;
	color: #1d2327;
}

.emwc-settings-wrap table.form-table td {
	padding: 15px 10px 15px 0;
	vertical-align: top;
}

.emwc-settings-wrap table.form-table td.forminp {
	display: block;
	position: relative;
}

/* Input fields - matches WooCommerce */
.emwc-settings-wrap table.form-table input[type="text"],
.emwc-settings-wrap table.form-table input[type="email"],
.emwc-settings-wrap table.form-table input[type="url"],
.emwc-settings-wrap table.form-table input[type="number"],
.emwc-settings-wrap table.form-table input[type="password"],
.emwc-settings-wrap table.form-table textarea {
	width: 400px;
	margin: 0;
	padding: 0 8px;
	box-sizing: border-box;
	vertical-align: top;
	height: auto;
	line-height: 2;
}

.emwc-settings-wrap table.form-table select {
	width: 400px;
	margin: 0;
	box-sizing: border-box;
	line-height: 32px;
	vertical-align: top;
	height: auto;
	min-height: 32px;
}

/* Select2 WooCommerce style for settings */
.emwc-settings-wrap .select2-container {
	width: 400px !important;
	max-width: 100%;
}

.emwc-settings-wrap .select2-container .select2-selection--single {
	height: 32px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
}

.emwc-settings-wrap .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 30px;
	padding-left: 8px;
}

.emwc-settings-wrap .select2-container .select2-selection--single .select2-selection__arrow {
	height: 30px;
}

.emwc-settings-wrap .select2-container--focus .select2-selection--single {
	border-color: var(--wp-admin-theme-color, #2271b1);
	box-shadow: 0 0 0 1px var(--wp-admin-theme-color, #2271b1);
	outline: none;
}

.emwc-settings-wrap table.form-table input.small-text {
	width: 80px;
}

.emwc-settings-wrap table.form-table input.regular-text {
	width: 400px;
}

.emwc-settings-wrap table.form-table input[type="checkbox"] {
	margin: 0 8px 0 0;
	vertical-align: middle;
}

/* Description text - matches WooCommerce */
.emwc-settings-wrap table.form-table p.description {
	margin-top: 8px;
	margin-bottom: 0;
	color: #646970;
	font-size: 13px;
	font-style: normal;
	line-height: 1.5;
}

.emwc-settings-wrap table.form-table span.description {
	color: #646970;
	font-size: 13px;
	font-style: normal;
	display: inline-block;
	margin-left: 8px;
}

/* Checkbox description inline */
.emwc-settings-wrap table.form-table label + p.description {
	margin-top: 4px;
}

/* Help tip - matches WooCommerce */
.emwc-settings-wrap .woocommerce-help-tip,
.emwc-settings-wrap .emwc-help-tip {
	color: #666;
	display: inline-block;
	font-size: 1.2em;
	font-style: normal;
	height: 16px;
	line-height: 16px;
	position: relative;
	vertical-align: middle;
	width: 16px;
	cursor: help;
}

.emwc-settings-wrap .woocommerce-help-tip::after,
.emwc-settings-wrap .emwc-help-tip::after {
	font-family: dashicons;
	content: "\f223";
	speak: never;
	font-weight: 400;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	margin: 0;
	text-indent: 0;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	text-align: center;
}

/* Tooltip positioning - inside th like WooCommerce */
.emwc-settings-wrap table.form-table th.titledesc {
	padding: 20px 10px 20px 0;
	vertical-align: top;
	line-height: 1.5;
}

.emwc-settings-wrap table.form-table th.titledesc label {
	display: inline;
}

.emwc-settings-wrap table.form-table th.titledesc .woocommerce-help-tip {
	margin: 0 0 0 4px;
	vertical-align: middle;
	cursor: help;
}

/* Add padding to the th to create space between tooltip and field */
.emwc-settings-wrap table.form-table th.titledesc {
	padding-right: 10px;
}

/* Form table th width to match WooCommerce */
.emwc-settings-wrap table.form-table th {
	width: 200px;
}

/* Position tooltip at the end of th cell like WooCommerce */
.emwc-settings-wrap table.form-table tr {
	position: relative;
}

.emwc-settings-wrap table.form-table th.titledesc {
	position: relative;
	padding-right: 30px;
}

.emwc-settings-wrap table.form-table th.titledesc .woocommerce-help-tip {
	position: absolute;
	right: 10px;
	top: 24px;
}

/* Section title - matches WooCommerce */
.emwc-settings-wrap h2 {
	font-size: 1.3em;
	margin: 1.5em 0 0.8em;
	padding: 0;
}

.emwc-settings-wrap h2:first-child {
	margin-top: 0;
}

.emwc-settings-wrap h3 {
	font-size: 1.1em;
	margin: 1.5em 0 0.5em;
}

/* Section description */
.emwc-settings-wrap .emwc-section-description {
	margin: 0 0 1em;
	color: #646970;
}

/* Submit button - matches WooCommerce */
.emwc-settings-wrap p.submit {
	margin-top: 1em;
	padding-top: 1em;
	border-top: 1px solid #c3c4c7;
}

.emwc-settings-wrap .button-primary {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.emwc-settings-wrap .button-primary:hover {
	background: #135e96;
	border-color: #135e96;
}

.emwc-settings-wrap .button-primary:disabled,
.emwc-settings-wrap .emwc-save-button:disabled {
	background: #f0f0f1 !important;
	border-color: #c3c4c7 !important;
	color: #a7aaad !important;
	cursor: not-allowed;
	box-shadow: none !important;
}

/* Settings saved notice - WooCommerce style */
.emwc-settings-wrap .emwc-settings-saved-notice {
	margin: 0 0 15px 0;
	padding: 12px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-left-width: 4px;
	border-left-color: #00a32a;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.emwc-settings-wrap .emwc-settings-saved-notice p {
	margin: 0;
	padding: 0;
	font-size: 13px;
	line-height: 1.5;
}

/* Fieldset for grouped checkboxes */
.emwc-settings-wrap fieldset {
	margin-top: 4px;
	padding: 0;
	border: 0;
}

.emwc-settings-wrap fieldset label {
	display: block;
	margin-bottom: 8px;
}

.emwc-settings-wrap fieldset label:last-child {
	margin-bottom: 0;
}

.emwc-settings-wrap fieldset p.description {
	margin-bottom: 8px;
}

/* System status table */
.emwc-settings-wrap .emwc-system-status {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 0;
	max-width: 600px;
}

.emwc-settings-wrap .emwc-system-status td {
	padding: 12px 15px;
	border-bottom: 1px solid #f0f0f1;
}

.emwc-settings-wrap .emwc-system-status tr:last-child td {
	border-bottom: none;
}

.emwc-settings-wrap .emwc-system-status td:first-child {
	font-weight: 600;
	width: 200px;
}

.emwc-settings-wrap .emwc-system-status code {
	background: #f0f0f1;
	padding: 2px 6px;
	border-radius: 3px;
}

/* Code block for shortcodes */
.emwc-settings-wrap code {
	background: #f0f0f1;
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 13px;
	font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
}

.emwc-settings-wrap .emwc-shortcode-block {
	background: #2d2d2d;
	color: #f8f8f2;
	padding: 10px 14px;
	border-radius: 4px;
	font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
	font-size: 13px;
	line-height: 1.5;
	margin: 10px 0;
	display: inline-block;
}

.emwc-settings-wrap .emwc-shortcode-block code {
	background: transparent;
	padding: 0;
	color: inherit;
	font-size: inherit;
}

/* Warning text */
.emwc-settings-wrap .emwc-warning {
	color: #d63638;
}

/* Link button */
.emwc-settings-wrap .button {
	margin-top: 8px;
}

/* ==========================================================================
   TipTip Tooltip Styles - WooCommerce Style
   ========================================================================== */

#tiptip_holder {
	display: none;
	z-index: 99999;
	position: absolute;
	top: 0;
	left: 0;
}

#tiptip_holder.tip_top {
	padding-bottom: 5px;
}

#tiptip_holder.tip_bottom {
	padding-top: 5px;
}

#tiptip_holder.tip_right {
	padding-left: 5px;
}

#tiptip_holder.tip_left {
	padding-right: 5px;
}

#tiptip_content {
	background: #1e1e1e;
	border-radius: 3px;
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	max-width: 200px;
	padding: 8px 12px;
	text-align: left;
}

#tiptip_arrow,
#tiptip_arrow_inner {
	position: absolute;
	border-color: transparent;
	border-style: solid;
	border-width: 6px;
	height: 0;
	width: 0;
}

#tiptip_holder.tip_top #tiptip_arrow,
#tiptip_holder.tip_top #tiptip_arrow_inner {
	border-top-color: #1e1e1e;
	border-bottom: 0;
}

#tiptip_holder.tip_bottom #tiptip_arrow,
#tiptip_holder.tip_bottom #tiptip_arrow_inner {
	border-bottom-color: #1e1e1e;
	border-top: 0;
}

#tiptip_holder.tip_right #tiptip_arrow,
#tiptip_holder.tip_right #tiptip_arrow_inner {
	border-right-color: #1e1e1e;
	border-left: 0;
}

#tiptip_holder.tip_left #tiptip_arrow,
#tiptip_holder.tip_left #tiptip_arrow_inner {
	border-left-color: #1e1e1e;
	border-right: 0;
}

#tiptip_holder.tip_top #tiptip_arrow {
	bottom: 0;
}

#tiptip_holder.tip_bottom #tiptip_arrow {
	top: 0;
}

#tiptip_holder.tip_right #tiptip_arrow {
	left: 0;
}

#tiptip_holder.tip_left #tiptip_arrow {
	right: 0;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
	.emwc-settings-wrap table.form-table th {
		width: auto;
		padding: 15px 0 5px;
		display: block;
	}

	.emwc-settings-wrap table.form-table td {
		padding: 5px 0 15px;
		display: block;
	}

	.emwc-settings-wrap table.form-table input[type="text"],
	.emwc-settings-wrap table.form-table input[type="email"],
	.emwc-settings-wrap table.form-table input[type="url"],
	.emwc-settings-wrap table.form-table input[type="number"],
	.emwc-settings-wrap table.form-table select,
	.emwc-settings-wrap table.form-table textarea {
		width: 100%;
	}

	.emwc-settings-wrap table.form-table th .woocommerce-help-tip {
		margin-left: 5px;
	}

	.emwc-settings-wrap table.form-table th.titledesc {
		padding: 10px 0;
	}
}

/* ==========================================================================
   Form Styles (Native WooCommerce Extended)
   ========================================================================== */

.emwc-form-row {
	margin-bottom: 15px;
}

.emwc-form-row label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

.emwc-form-row .description {
	color: #646970;
	font-style: italic;
	margin-top: 5px;
}

/* Ensure SelectWoo dropdowns display properly. */
.emwc-form-row .wc-enhanced-select {
	min-width: 350px;
}

/* Date/time inputs. */
.emwc-date-input,
.emwc-time-input {
	width: auto;
}

.emwc-datetime-row {
	display: flex;
	gap: 10px;
	align-items: center;
}

/* ==========================================================================
   Event Meta Box Styles
   ========================================================================== */

.emwc-meta-box-content {
	padding: 12px;
}

.emwc-meta-field {
	margin-bottom: 15px;
}

.emwc-meta-field:last-child {
	margin-bottom: 0;
}

.emwc-meta-field label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

.emwc-meta-field input[type="text"],
.emwc-meta-field input[type="url"],
.emwc-meta-field input[type="number"],
.emwc-meta-field textarea,
.emwc-meta-field select {
	width: 100%;
}

.emwc-meta-field input[type="checkbox"] {
	margin-right: 5px;
}

/* ==========================================================================
   Attendees List Table
   ========================================================================== */

.emwc-attendees-table {
	width: 100%;
}

.emwc-attendee-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 12px;
}

.emwc-attendee-status.active {
	background: #d1e7dd;
	color: #0f5132;
}

.emwc-attendee-status.checked-in {
	background: #cff4fc;
	color: #055160;
}

.emwc-attendee-status.cancelled {
	background: #f8d7da;
	color: #842029;
}

/* ==========================================================================
   Check-in Interface
   ========================================================================== */

.emwc-checkin-interface {
	max-width: 800px;
}

.emwc-checkin-scanner {
	background: #f0f0f1;
	border: 2px dashed #c3c4c7;
	border-radius: 8px;
	padding: 40px;
	text-align: center;
	margin-bottom: 20px;
}

.emwc-checkin-scanner-active {
	border-color: #2271b1;
	background: #f0f6fc;
}

.emwc-checkin-result {
	padding: 15px;
	border-radius: 4px;
	margin-bottom: 15px;
}

.emwc-checkin-result.success {
	background: #d1e7dd;
	border: 1px solid #badbcc;
}

.emwc-checkin-result.error {
	background: #f8d7da;
	border: 1px solid #f5c2c7;
}

/* ==========================================================================
   List Table Styles
   ========================================================================== */

.emwc-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 500;
}

.emwc-status-scheduled {
	background: #e7f5ea;
	color: #1e4620;
}

.emwc-status-postponed {
	background: #fef6e7;
	color: #8a6914;
}

.emwc-status-cancelled {
	background: #fcecec;
	color: #8a1f1f;
}

.emwc-status-sold-out {
	background: #f0f0f1;
	color: #646970;
}

.emwc-time {
	color: #646970;
	font-size: 12px;
}

.emwc-end-date {
	color: #646970;
	font-size: 12px;
	font-style: italic;
}

.emwc-no-date,
.emwc-no-venue {
	color: #a7aaad;
	font-style: italic;
}

.emwc-venue-city {
	color: #646970;
	font-size: 12px;
}

.emwc-virtual-icon {
	color: #2271b1;
	vertical-align: middle;
}

.emwc-past-event {
	color: #a7aaad;
	font-size: 11px;
	font-style: italic;
}

.emwc-ongoing-event {
	color: #00a32a;
	font-size: 11px;
	font-weight: 500;
}

/* ==========================================================================
   Event List Table - WooCommerce Style
   ========================================================================== */

/* Thumbnail column - like WooCommerce products */
.post-type-emwc_event .column-thumb {
	width: 52px;
	text-align: center;
	white-space: nowrap;
	padding: 8px;
}

.post-type-emwc_event .column-thumb img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
	margin: 0 auto;
}

.post-type-emwc_event .column-thumb .emwc-event-placeholder {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f1;
	border-radius: 4px;
	color: #a7aaad;
	font-size: 20px;
	margin: 0 auto;
}

/* Title column - wider like WooCommerce */
.post-type-emwc_event .column-title {
	width: auto;
}

/* Date column */
.post-type-emwc_event .column-event_date {
	width: 140px;
}

/* Venue column */
.post-type-emwc_event .column-event_venue {
	width: 150px;
}

/* Status column */
.post-type-emwc_event .column-event_status {
	width: 100px;
}

/* Attendees column */
.post-type-emwc_event .column-event_attendees {
	width: 80px;
	text-align: center;
}

.post-type-emwc_event .column-event_attendees a {
	text-decoration: none;
}

.post-type-emwc_event .column-event_attendees a:hover {
	color: #2271b1;
}

.emwc-no-attendees {
	color: #a7aaad;
}

/* Published column */
.post-type-emwc_event .column-date {
	width: 120px;
}

/* ==========================================================================
   jQuery UI Datepicker Styles (Local)
   ========================================================================== */

.ui-datepicker {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
	padding: 10px;
	width: 280px;
	z-index: 99999 !important;
}

.ui-datepicker-header {
	background: #f0f0f1;
	border: none;
	border-radius: 3px 3px 0 0;
	margin: -10px -10px 10px;
	padding: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ui-datepicker-title {
	font-weight: 600;
	color: #1d2327;
}

.ui-datepicker-prev,
.ui-datepicker-next {
	cursor: pointer;
	color: #2271b1;
	font-size: 0;
	width: 24px;
	height: 24px;
	position: relative;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
	color: #135e96;
}

.ui-datepicker-prev::before,
.ui-datepicker-next::before {
	font-family: dashicons;
	font-size: 20px;
	line-height: 24px;
	position: absolute;
	top: 0;
	left: 0;
}

.ui-datepicker-prev::before {
	content: "\f341";
}

.ui-datepicker-next::before {
	content: "\f345";
}

.ui-datepicker-calendar {
	width: 100%;
	border-collapse: collapse;
}

.ui-datepicker-calendar th {
	color: #646970;
	font-size: 12px;
	font-weight: 600;
	padding: 5px;
	text-align: center;
}

.ui-datepicker-calendar td {
	padding: 2px;
	text-align: center;
}

.ui-datepicker-calendar td a,
.ui-datepicker-calendar td span {
	display: block;
	padding: 6px;
	border-radius: 3px;
	color: #1d2327;
	text-decoration: none;
}

.ui-datepicker-calendar td a:hover {
	background: #f0f0f1;
}

.ui-datepicker-calendar .ui-state-active {
	background: #2271b1;
	color: #fff;
}

.ui-datepicker-calendar .ui-state-highlight {
	background: #f0f6fc;
	border: 1px solid #2271b1;
}

.ui-datepicker-calendar .ui-state-disabled span {
	color: #a7aaad;
}

/* Datepicker button panel */
.ui-datepicker-buttonpane {
	display: flex;
	justify-content: space-between;
	padding: 8px 0 0;
	margin-top: 8px;
	border-top: 1px solid #ddd;
}

.ui-datepicker-buttonpane button {
	padding: 4px 12px;
	font-size: 12px;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #f6f7f7;
	cursor: pointer;
}

.ui-datepicker-buttonpane button:hover {
	background: #f0f0f1;
	border-color: #8c8f94;
}

/* Datepicker responsive adjustments */
@media screen and (max-width: 782px) {
	.ui-datepicker {
		width: 260px;
		max-width: calc(100vw - 40px);
	}
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

/* ==========================================================================
   Event Details Meta Box
   ========================================================================== */

.emwc-event-details-box {
	padding: 12px;
}

.emwc-details-columns {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
}

.emwc-details-column {
	flex: 1;
	min-width: 300px;
}

@media screen and (max-width: 782px) {
	.emwc-details-columns {
		flex-direction: column;
	}
}

.emwc-event-details-box .form-field {
	margin-bottom: 16px;
}

.emwc-event-details-box .form-field > label,
.emwc-event-details-box .emwc-field > label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
}

.emwc-event-details-box .emwc-checkbox-row {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f1;
	margin-bottom: 16px;
}

.emwc-event-details-box .emwc-checkbox-row label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: normal;
	cursor: pointer;
}

.emwc-event-details-box .emwc-required {
	color: #d63638;
}

.emwc-event-details-box .emwc-field-description {
	display: block;
	margin-top: 6px;
	color: #646970;
	font-style: italic;
	font-size: 12px;
}

.emwc-event-details-box .emwc-select-full {
	width: 100%;
	max-width: 100%;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.emwc-event-details-box .emwc-input-full {
	width: 100% !important;
	max-width: 100% !important;
	height: 36px !important;
	padding: 0 10px !important;
	border: 1px solid #8c8f94 !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	box-sizing: border-box !important;
}

/* Capacity field specific */
#emwc_capacity {
	width: 100% !important;
	height: 36px !important;
	padding: 0 10px !important;
	border: 1px solid #8c8f94 !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	box-sizing: border-box !important;
}

/* Registration deadline field specific */
#emwc_registration_deadline {
	width: 100% !important;
	height: 36px !important;
	padding: 0 10px !important;
	border: 1px solid #8c8f94 !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	box-sizing: border-box !important;
}

.emwc-datetime-wrapper {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.emwc-date-field {
	flex: 1;
	max-width: 200px;
	padding: 8px 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
}

.emwc-date-field:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* Time input field */
.emwc-time-input {
	width: 120px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
	box-sizing: border-box;
}

.emwc-time-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* Fix time dropdown overlap/cutoff issues */
.emwc-event-details-box,
.emwc-details-columns,
.emwc-details-column,
.emwc-datetime-wrapper,
.form-field {
	overflow: visible !important;
}

/* Ensure Select2 dropdown appears above everything */
.select2-container--open .select2-dropdown {
	z-index: 100100 !important;
}

/* WordPress meta box overrides */
#emwc-event-details .inside,
#emwc-event-details {
	overflow: visible !important;
}

.postbox .inside {
	overflow: visible;
}

.emwc-timezone-select {
	width: 100%;
	max-width: 350px;
}

/* All-day mode - time fields remain fully visible.
   All-day events still have start/end times for scheduling purposes. */
.emwc-all-day-mode .emwc-time-field,
.emwc-all-day-mode .emwc-time-field + .select2-container {
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* ==========================================================================
   Event Location Meta Box
   ========================================================================== */

.emwc-location-box {
	padding: 12px;
}

.emwc-location-box .emwc-field {
	margin-bottom: 16px;
}

.emwc-location-box .emwc-field > label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
}

.emwc-location-box .emwc-select {
	width: 100%;
}

.emwc-location-box .emwc-input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.emwc-location-box .emwc-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.emwc-location-box .emwc-description {
	display: block;
	margin-top: 6px;
	color: #646970;
	font-style: italic;
	font-size: 12px;
}

.emwc-location-box .emwc-field-link {
	display: block;
	margin-top: 6px;
}

.emwc-location-box .emwc-field-link a {
	text-decoration: none;
	font-size: 12px;
}

/* ==========================================================================
   Recurrence Meta Box
   ========================================================================== */

.emwc-recurrence-box {
	padding: 12px;
}

.emwc-recurrence-box .emwc-field {
	margin-bottom: 16px;
}

.emwc-recurrence-box .emwc-field > label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
}

.emwc-recurrence-box .emwc-field-inline > label {
	display: inline;
	margin-right: 8px;
}

.emwc-recurrence-box .emwc-select {
	width: 100%;
}

.emwc-recurrence-box .emwc-datepicker {
	width: 150px;
	padding: 6px 10px;
}

.emwc-recurrence-box .small-text {
	width: 60px;
}

.emwc-weekday-checkboxes {
	display: flex;
	gap: 4px;
	margin-top: 8px;
}

.emwc-weekday-checkbox {
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
}

.emwc-weekday-checkbox input {
	display: none;
}

.emwc-weekday-checkbox span {
	padding: 8px 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
}

.emwc-weekday-checkbox input:checked + span {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.emwc-recurrence-preview {
	background: #f6f7f7;
	padding: 12px;
	border-radius: 4px;
	margin-top: 16px;
}

.emwc-recurrence-preview strong {
	margin-right: 8px;
}

.emwc-recurrence-actions {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e0e0e0;
}

.emwc-recurrence-actions .button {
	margin-right: 10px;
}

.emwc-action-description {
	color: #666;
	font-size: 12px;
	font-style: italic;
}

.emwc-recurrence-notice {
	padding: 12px;
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
}

.emwc-recurrence-notice p {
	margin: 0;
}

.emwc-recurrence-parent-notice {
	padding: 10px 12px;
	background: #fcf9e8;
	border-left: 4px solid #dba617;
	margin-bottom: 12px;
}

.emwc-recurrence-parent-notice p {
	margin: 0;
}

/* ==========================================================================
   Event Settings Meta Box
   ========================================================================== */

.emwc-settings-box {
	padding: 6px 12px;
}

.emwc-settings-columns {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
}

.emwc-settings-column {
	flex: 1;
	min-width: 280px;
}

@media screen and (max-width: 782px) {
	.emwc-settings-columns {
		flex-direction: column;
	}
}

.emwc-settings-box .emwc-field {
	margin-bottom: 14px;
}

.emwc-settings-box .emwc-field > label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.emwc-settings-box .emwc-checkbox-field label {
	display: inline;
	font-weight: normal;
}

.emwc-settings-box .emwc-input {
	width: 100%;
	max-width: 100%;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.emwc-settings-box .emwc-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.emwc-settings-box .emwc-description {
	display: block;
	margin-top: 4px;
	color: #646970;
	font-style: italic;
	font-size: 12px;
}

.emwc-settings-box .emwc-select-full {
	width: 100%;
}

/* Ensure date fields match full width */
.emwc-settings-box .emwc-date-field {
	width: 100% !important;
	max-width: 100% !important;
}

/* ==========================================================================
   Event Tickets Meta Box
   ========================================================================== */

.emwc-tickets-table {
	margin-bottom: 15px;
}

.emwc-tickets-table th,
.emwc-tickets-table td {
	padding: 10px;
}

.emwc-no-tickets {
	color: #666;
	font-style: italic;
	margin: 15px 0;
}

.emwc-add-ticket-actions {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #e0e0e0;
}

/* ==========================================================================
   Venue Information Meta Box
   ========================================================================== */

.emwc-venue-info-box {
	padding: 12px;
}

.emwc-venue-info-box h4 {
	margin: 0 0 15px 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #ddd;
	font-size: 14px;
}

.emwc-venue-columns {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
}

.emwc-venue-column {
	flex: 1;
	min-width: 280px;
}

.emwc-venue-info-box .emwc-field {
	margin-bottom: 12px;
}

.emwc-venue-info-box .emwc-field > label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

.emwc-venue-info-box .emwc-input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.emwc-venue-info-box .emwc-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.emwc-venue-info-box .emwc-description {
	display: block;
	margin-top: 4px;
	color: #646970;
	font-style: italic;
	font-size: 12px;
}

.emwc-venue-info-box .emwc-field-row {
	display: flex;
	gap: 15px;
}

.emwc-venue-info-box .emwc-field-half {
	flex: 1;
}

.emwc-venue-info-box .emwc-country-select {
	width: 100%;
}

/* Fix country dropdown height to match other inputs */
.emwc-venue-info-box .select2-container--default .select2-selection--single {
	height: 36px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
}

.emwc-venue-info-box .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 34px;
	padding-left: 10px;
}

.emwc-venue-info-box .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 34px;
}

/* ==========================================================================
   Organizer Information Meta Box
   ========================================================================== */

.emwc-organizer-info-box {
	padding: 12px;
}

.emwc-organizer-info-box h4 {
	margin: 0 0 15px 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #ddd;
	font-size: 14px;
}

.emwc-organizer-columns {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
}

.emwc-organizer-column {
	flex: 1;
	min-width: 280px;
}

.emwc-organizer-info-box .emwc-field {
	margin-bottom: 12px;
}

.emwc-organizer-info-box .emwc-field > label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

.emwc-organizer-info-box .emwc-input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.emwc-organizer-info-box .emwc-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* ==========================================================================
   Product Event Ticket Panel
   ========================================================================== */

/* Event selector dropdown in product data panel - Fix width issue */
#emwc_event_data p.form-field select#_emwc_event_id {
	width: 50% !important;
	min-width: 300px !important;
}

#emwc_event_data p.form-field .select2-container {
	width: 50% !important;
	min-width: 300px !important;
	max-width: calc(100% - 180px) !important;
}

/* Override any inline width styles from Select2 */
#emwc_event_data .select2-container--default {
	width: 50% !important;
	min-width: 300px !important;
}

#emwc_event_data .select2-container--default .select2-selection--single {
	height: 32px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	width: 100% !important;
}

#emwc_event_data .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 30px;
	padding-left: 8px;
	padding-right: 25px;
	width: 100% !important;
}

#emwc_event_data .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 30px;
}

/* Make sure the Select2 dropdown options are wide enough */
body .select2-container--open .select2-dropdown {
	min-width: 300px !important;
}



.emwc-fields-table {
	margin: 5px 12px 10px;
	width: calc(100% - 24px);
}

.emwc-fields-table th {
	text-align: left;
	padding: 8px;
	background: #f9f9f9;
	font-weight: 600;
}

.emwc-fields-table td {
	padding: 6px 8px;
}

.emwc-fields-table input[type="text"] {
	width: 100%;
}

.emwc-fields-table select {
	width: 100%;
}

.emwc-remove-field {
	color: #a00;
	font-size: 18px;
	text-decoration: none;
}

.emwc-remove-field:hover {
	color: #dc3232;
}

/* Variation ticket fields. */
.emwc-var-ticket-fields {
	border-top: 1px solid #eee;
	padding: 10px 0;
	margin-top: 10px;
}

.emwc-var-ticket-fields .form-row {
	margin-bottom: 10px;
}

.emwc-var-ticket-fields .form-row label {
	display: block;
	margin-bottom: 4px;
}

.emwc-var-ticket-fields .emwc-input-full {
	width: 100%;
}


.emwc-var-fields-wrapper {
	clear: both;
	padding: 10px 0;
}

.emwc-var-fields-table {
	font-size: 12px;
}

.emwc-var-fields-table th {
	text-align: left;
	padding: 4px 8px;
}

.emwc-var-fields-table .emwc-col-type {
	width: 100px;
}

.emwc-var-fields-table .emwc-col-required {
	width: 80px;
}

.emwc-var-fields-table .emwc-col-actions {
	width: 30px;
}

.emwc-var-fields-table td input,
.emwc-var-fields-table td select {
	width: 100%;
}

.emwc-var-remove-field {
	color: #a00;
	text-decoration: none;
}

.emwc-var-remove-field:hover {
	color: #dc3232;
}

/* ==========================================================================
   Speaker Admin Columns
   ========================================================================== */

.emwc-speaker-photo-placeholder {
	font-size: 40px;
	width: 50px;
	height: 50px;
	color: #ccc;
}

.emwc-speaker-photo {
	border-radius: 50%;
}

/* Speakers checklist - similar to WordPress categories */
.emwc-speakers-box .emwc-no-speakers {
	color: #646970;
	font-style: italic;
	margin: 0;
}

.emwc-speakers-checklist {
	max-height: 200px;
	overflow-y: auto;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #fff;
}

.emwc-speakers-checklist .categorychecklist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.emwc-speakers-checklist .categorychecklist li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #f0f0f1;
}

.emwc-speakers-checklist .categorychecklist li:last-child {
	border-bottom: none;
}

.emwc-speakers-checklist .categorychecklist label {
	display: block;
	padding: 8px 10px;
	cursor: pointer;
	transition: background 0.1s ease;
}

.emwc-speakers-checklist .categorychecklist label:hover {
	background: #f6f7f7;
}

.emwc-speakers-checklist .categorychecklist input[type="checkbox"] {
	margin-right: 6px;
	vertical-align: middle;
}

.emwc-speakers-actions {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #f0f0f1;
}

.emwc-add-speaker-link {
	color: #2271b1;
	text-decoration: none;
	font-size: 13px;
}

.emwc-add-speaker-link:hover {
	color: #135e96;
	text-decoration: underline;
}

/* ==========================================================================
   Settings Page Enhancements
   ========================================================================== */

.emwc-settings-warning {
	color: #d63638;
}

.emwc-webhooks-table {
	max-width: 600px;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media screen and (max-width: 782px) {
	/* Dashboard responsive */
	.emwc-dashboard-cards {
		flex-direction: column;
	}

	.emwc-dashboard-card {
		min-width: 100%;
	}

	.emwc-dashboard-row {
		flex-direction: column;
	}

	.emwc-dashboard-box {
		min-width: 100%;
	}

	.emwc-dashboard-lists .emwc-dashboard-box {
		min-width: 100%;
	}

	.emwc-dashboard-box table.widefat {
		display: block;
		overflow-x: auto;
	}

	/* Other responsive */
	.emwc-datetime-row,
	.emwc-datetime-wrapper {
		flex-direction: column;
		align-items: stretch;
	}

	.emwc-venue-columns,
	.emwc-organizer-columns {
		flex-direction: column;
	}

	.emwc-venue-info-box .emwc-field-row {
		flex-direction: column;
	}
}

/* Attendee status colors. */
.emwc-checked-in { color: #00a32a; }
.emwc-not-checked-in { color: #646970; }
.emwc-status-active { color: #00a32a; }
.emwc-status-cancelled { color: #d63638; }
.emwc-status-refunded { color: #dba617; }

/* ==========================================================================
   Welcome Notice
   ========================================================================== */

.emwc-welcome-notice {
	padding: 0;
	border-left-color: #7f54b3;
}

.emwc-notice-content {
	display: flex;
	align-items: flex-start;
	padding: 15px;
}

.emwc-notice-icon {
	flex-shrink: 0;
	margin-right: 15px;
}

.emwc-notice-icon .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
	color: #7f54b3;
}

.emwc-notice-text h3 {
	margin: 0 0 10px 0;
	font-size: 16px;
}

.emwc-notice-text p {
	margin: 0 0 10px 0;
}

.emwc-notice-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.emwc-notice-dismiss {
	color: #666;
	text-decoration: none;
}

.emwc-notice-dismiss:hover {
	color: #d63638;
}

/* ==========================================================================
   CSV Import
   ========================================================================== */

.emwc-import-wrap {
	max-width: 900px;
}

.emwc-import-steps {
	display: flex;
	margin: 30px 0;
	padding: 0;
	list-style: none;
}

.emwc-step {
	flex: 1;
	text-align: center;
	padding: 15px;
	background: #f6f7f7;
	border: 1px solid #ddd;
	margin-right: -1px;
	position: relative;
}

.emwc-step:first-child {
	border-radius: 4px 0 0 4px;
}

.emwc-step:last-child {
	border-radius: 0 4px 4px 0;
	margin-right: 0;
}

.emwc-step.active {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

.emwc-step.completed {
	background: #00a32a;
	color: #fff;
	border-color: #00a32a;
}

.emwc-step .step-number {
	display: block;
	font-size: 24px;
	font-weight: 600;
}

.emwc-step .step-label {
	font-size: 13px;
}

.emwc-import-box {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 25px;
}

.emwc-import-box h2 {
	margin-top: 0;
}

.emwc-file-upload {
	padding: 40px;
	border: 2px dashed #c3c4c7;
	border-radius: 8px;
	text-align: center;
	margin: 20px 0;
}

.emwc-file-upload:hover {
	border-color: #2271b1;
}

.emwc-mapping-table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0;
}

.emwc-mapping-table th,
.emwc-mapping-table td {
	padding: 12px;
	text-align: left;
	border-bottom: 1px solid #ddd;
}

.emwc-mapping-table th {
	background: #f6f7f7;
	font-weight: 600;
}

.emwc-mapping-table select {
	min-width: 200px;
}

.emwc-preview-table {
	width: 100%;
	font-size: 12px;
	overflow-x: auto;
	display: block;
}

.emwc-preview-table th,
.emwc-preview-table td {
	padding: 8px;
	border: 1px solid #ddd;
	white-space: nowrap;
}

.emwc-preview-table th {
	background: #f6f7f7;
}

.emwc-import-wrap .emwc-required {
	color: #d63638;
}

.emwc-hint {
	color: #646970;
	font-size: 12px;
}

.emwc-results {
	margin: 20px 0;
}

.emwc-results .success {
	color: #00a32a;
}

.emwc-results .warning {
	color: #dba617;
}

.emwc-error-list {
	max-height: 200px;
	overflow-y: auto;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 4px;
	padding: 15px;
	margin-top: 15px;
}

.emwc-error-list li {
	color: #991b1b;
	margin-bottom: 5px;
}

/* ==========================================================================
   Admin Waitlist
   ========================================================================== */

.column-position {
	width: 40px;
}

.status-waiting {
	color: #0073aa;
	font-weight: 600;
}

.status-notified {
	color: #f0ad4e;
	font-weight: 600;
}

.status-purchased {
	color: #46b450;
	font-weight: 600;
}

.status-expired {
	color: #dc3232;
	font-weight: 600;
}

/* ==========================================================================
   Seating Builder (Admin)
   ========================================================================== */

.emwc-seating-builder {
	margin-top: 10px;
}

.emwc-sections-table {
	border-collapse: collapse;
}

.emwc-sections-table th {
	text-align: left;
	padding: 12px 8px;
	font-weight: 600;
	background: #f9f9f9;
}

.emwc-sections-table td {
	padding: 10px 8px;
	vertical-align: middle;
	border-bottom: 1px solid #e5e5e5;
}

.emwc-sections-table input.small-text {
	width: 80px;
}

.emwc-sections-table input.regular-text {
	width: 100%;
}

.emwc-remove-section {
	color: #dc3232 !important;
	border-color: #dc3232 !important;
	min-width: 32px;
}

.emwc-remove-section:hover {
	background: #dc3232 !important;
	color: #fff !important;
}

.emwc-section-row td {
	background: #fff;
}

#emwc-add-section .dashicons {
	vertical-align: middle;
}

