/**
 * Restaurant Forms Module - Custom Styles
 *
 * @package HoustonRestaurantWeeks
 * @subpackage Modules\RestaurantForms
 * @since 2.0.0
 */

/* ========================================
   Global ACF Overrides
   ======================================== */

/* Remove left border between adjacent fields with data-width */
.acf-field[data-width]+.acf-field[data-width] {
	border-left: none !important;
}

/* Also target any ACF field borders that may appear */
.acf-fields>.acf-field {
	border: none !important;
}

::placeholder {
	line-height: 1;
}

/* ========================================
   Price Point Radio Buttons - Button Style
   ======================================== */


/* Target dinner price and dinner price to-go fields */
.acf-field[data-name="dinner_price"] .acf-radio-list,
.acf-field[data-name="dinner_price_go_to"] .acf-radio-list,
.acf-field[data-name="dinner_price_point"] .acf-radio-list,
.acf-field[data-name="dinner_price_togo"] .acf-radio-list {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	gap: 12px !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.acf-field[data-name="dinner_price"] .acf-radio-list li,
.acf-field[data-name="dinner_price_go_to"] .acf-radio-list li,
.acf-field[data-name="dinner_price_point"] .acf-radio-list li,
.acf-field[data-name="dinner_price_togo"] .acf-radio-list li {
	margin: 0 !important;
	padding: 0 !important;
}

.acf-field[data-name="dinner_price"] .acf-radio-list label,
.acf-field[data-name="dinner_price_go_to"] .acf-radio-list label,
.acf-field[data-name="dinner_price_point"] .acf-radio-list label,
.acf-field[data-name="dinner_price_togo"] .acf-radio-list label {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 100px !important;
	padding: 14px 24px !important;
	background: #f3f4f6 !important;
	border: 2px solid #e5e7eb !important;
	border-radius: 8px !important;
	cursor: pointer !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	color: #374151 !important;
	transition: all 0.2s ease !important;
	text-align: center !important;
}

.acf-field[data-name="dinner_price"] .acf-radio-list label:hover,
.acf-field[data-name="dinner_price_go_to"] .acf-radio-list label:hover,
.acf-field[data-name="dinner_price_point"] .acf-radio-list label:hover,
.acf-field[data-name="dinner_price_togo"] .acf-radio-list label:hover {
	background: #e0f2fe !important;
	border-color: #0ea5e9 !important;
	color: #0369a1 !important;
}

/* Hide the actual radio input visually but keep it accessible */
.acf-field[data-name="dinner_price"] .acf-radio-list input[type="radio"],
.acf-field[data-name="dinner_price_go_to"] .acf-radio-list input[type="radio"],
.acf-field[data-name="dinner_price_point"] .acf-radio-list input[type="radio"],
.acf-field[data-name="dinner_price_togo"] .acf-radio-list input[type="radio"] {
	position: absolute !important;
	opacity: 0 !important;
	width: 0 !important;
	height: 0 !important;
	pointer-events: none !important;
}

/* Selected state */
.acf-field[data-name="dinner_price"] .acf-radio-list input[type="radio"]:checked+label,
.acf-field[data-name="dinner_price_go_to"] .acf-radio-list input[type="radio"]:checked+label,
.acf-field[data-name="dinner_price_point"] .acf-radio-list input[type="radio"]:checked+label,
.acf-field[data-name="dinner_price_togo"] .acf-radio-list input[type="radio"]:checked+label,
.acf-field[data-name="dinner_price"] .acf-radio-list li.selected label,
.acf-field[data-name="dinner_price_go_to"] .acf-radio-list li.selected label,
.acf-field[data-name="dinner_price_point"] .acf-radio-list li.selected label,
.acf-field[data-name="dinner_price_togo"] .acf-radio-list li.selected label {
	background: #0ea5e9 !important;
	border-color: #0284c7 !important;
	color: #ffffff !important;
	box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3) !important;
}

/* Focus state for accessibility */
.acf-field[data-name="dinner_price"] .acf-radio-list input[type="radio"]:focus+label,
.acf-field[data-name="dinner_price_go_to"] .acf-radio-list input[type="radio"]:focus+label,
.acf-field[data-name="dinner_price_point"] .acf-radio-list input[type="radio"]:focus+label,
.acf-field[data-name="dinner_price_togo"] .acf-radio-list input[type="radio"]:focus+label {
	outline: 2px solid #0ea5e9 !important;
	outline-offset: 2px !important;
}

/* Responsive - stack on smaller screens */
@media (max-width: 480px) {

	.acf-field[data-name="dinner_price"] .acf-radio-list,
	.acf-field[data-name="dinner_price_go_to"] .acf-radio-list,
	.acf-field[data-name="dinner_price_point"] .acf-radio-list,
	.acf-field[data-name="dinner_price_togo"] .acf-radio-list {
		flex-direction: column !important;
	}

	.acf-field[data-name="dinner_price"] .acf-radio-list label,
	.acf-field[data-name="dinner_price_go_to"] .acf-radio-list label,
	.acf-field[data-name="dinner_price_point"] .acf-radio-list label,
	.acf-field[data-name="dinner_price_togo"] .acf-radio-list label {
		width: 100% !important;
	}
}

/* ========================================
   ACF Repeater Course/Dish Rows - Modern Style
   ======================================== */

/* Parent course repeater - clean card style */
.acf-repeater>.acf-table {
	border-collapse: separate !important;
	border-spacing: 0 !important;
}

.acf-repeater>.acf-table>tbody>.acf-row {
	background: #ffffff !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 12px !important;
	margin-bottom: 16px !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
	transition: box-shadow 0.2s ease !important;
}

.acf-repeater>.acf-table>tbody>.acf-row:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Remove old table cell borders */
.acf-repeater>.acf-table>tbody>.acf-row>td {
	border: none !important;
	background: transparent !important;
}

/* Nested repeater (dishes within courses) */
.acf-repeater .acf-repeater>.acf-table>tbody>.acf-row {
	background: #f9fafb !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 8px !important;
	margin-bottom: 12px !important;
	box-shadow: none !important;
}

.acf-repeater .acf-repeater>.acf-table>tbody>.acf-row:hover {
	background: #f3f4f6 !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

/* Row number badge styling */
.acf-repeater .acf-row-handle .order {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 32px !important;
	height: 32px !important;
	background: #e0f2fe !important;
	border-radius: 50% !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #0369a1 !important;
	border: 2px solid #bae6fd !important;
}

/* Nested row numbers - slightly different style */
.acf-repeater .acf-repeater .acf-row-handle .order {
	width: 28px !important;
	height: 28px !important;
	background: #f0f9ff !important;
	font-size: 13px !important;
	border-color: #e0f2fe !important;
}

/* Table headers */
.acf-repeater>.acf-table>thead>tr>th {
	background: transparent !important;
	border: none !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #6b7280 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	padding: 12px 16px !important;
}

/* Input fields within repeater rows */
.acf-repeater .acf-row input[type="text"],
.acf-repeater .acf-row input[type="number"],
.acf-repeater .acf-row textarea {
	border: 1px solid #d1d5db !important;
	border-radius: 6px !important;
	padding: 10px 14px !important;
	font-size: 15px !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
	background: #ffffff !important;
}

.acf-repeater .acf-row input[type="text"]:focus,
.acf-repeater .acf-row input[type="number"]:focus,
.acf-repeater .acf-row textarea:focus {
	border-color: #0ea5e9 !important;
	box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
	outline: none !important;
}

/* Add Row button styling */
.acf-repeater .acf-actions .acf-button {
	background: #0ea5e9 !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 8px !important;
	padding: 12px 20px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2) !important;
}

.acf-repeater .acf-actions .acf-button:hover {
	background: #0284c7 !important;
	box-shadow: 0 4px 8px rgba(14, 165, 233, 0.3) !important;
	transform: translateY(-1px) !important;
}

/* Remove/Add icons in row handles */
.acf-repeater .acf-row-handle .acf-icon {
	background: #f3f4f6 !important;
	border-radius: 6px !important;
	transition: all 0.2s ease !important;
}

.acf-repeater .acf-row-handle .acf-icon:hover {
	background: #e5e7eb !important;
}

.acf-repeater .acf-row-handle .acf-icon.-minus:hover {
	background: #fee2e2 !important;
	color: #dc2626 !important;
}

.acf-repeater .acf-row-handle .acf-icon.-plus:hover {
	background: #dcfce7 !important;
	color: #16a34a !important;
}

/* Clone row template - ensure it doesn't show old styles */
.acf-repeater>.acf-table>tbody>.acf-row.acf-clone {
	display: none !important;
}

/* Course title field - make it stand out */
.acf-field[data-name="add_course_title"] input[type="text"] {
	font-size: 18px !important;
	font-weight: 600 !important;
	color: #1f2937 !important;
	background: transparent !important;
	border: none !important;
	border-bottom: 2px solid #e5e7eb !important;
	border-radius: 0 !important;
	padding: 8px 0 !important;
}

.acf-field[data-name="add_course_title"] input[type="text"]:focus {
	border-bottom-color: #0ea5e9 !important;
	box-shadow: none !important;
}