/**
 * Front-end Form Styles
 *
 * @package Service_Appointment_Form
 */

.saf-appointment-form {
	max-width: 800px;
	margin: 20px auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.saf-form-header-text {
	margin-bottom: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
}

.saf-form-submit-text {
	margin-bottom: 15px;
	font-size: 13px;
	color: #666;
	line-height: 1.5;
}

.saf-form-errors {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 4px;
}

.saf-form-errors .saf-error {
	margin: 5px 0;
}

.saf-form-success {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 4px;
}

.saf-form-success .saf-success-message {
	margin: 0;
	font-weight: 500;
}

.saf-form {
	background: #fff;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.saf-form-section {
	margin-bottom: 30px;
	padding-bottom: 2px;
	border-bottom: 1px solid #e0e0e0;
}

.saf-form-section:last-of-type {
	border-bottom: none;
}

.saf-section-title {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 20px;
	color: #333;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 10px;
}

.saf-form-fields-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-bottom: 2px;
}

@media (min-width: 768px) {
	.saf-form-fields-row {
		grid-template-columns: 1fr 1fr;
	}
	
	.saf-form-fields-row-3 {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

.saf-form-field {
	margin-bottom: 0;
}

.saf-form-field-full {
	grid-column: 1 / -1;
}

.saf-form-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333;
}

.saf-form-field .required {
	color: #dc3232;
}

.saf-form-field input[type="text"],
.saf-form-field input[type="email"],
.saf-form-field input[type="date"],
.saf-form-field select,
.saf-form-field textarea {
	width: 100%;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.3s;
}

.saf-form-field input[type="text"]:focus,
.saf-form-field input[type="email"]:focus,
.saf-form-field input[type="date"]:focus,
.saf-form-field select:focus,
.saf-form-field textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.saf-form-field input.saf-error,
.saf-form-field select.saf-error,
.saf-form-field textarea.saf-error {
	border-color: #dc3232;
}

.saf-field-error {
	display: block;
	color: #dc3232;
	font-size: 13px;
	margin-top: 5px;
}

.saf-checkbox-field label {
	display: flex;
	align-items: flex-start;
	font-weight: normal;
	cursor: pointer;
}

.saf-checkbox-field input[type="checkbox"] {
	width: auto;
	margin-right: 8px;
	margin-top: 3px;
	cursor: pointer;
}

.saf-checkbox-field a {
	color: #0073aa;
	text-decoration: underline;
	margin: 0 3px;
}

.saf-checkbox-field a:hover {
	color: #005177;
}

.saf-char-count {
	font-size: 12px;
	color: #666;
	margin-top: 5px;
}

.saf-form-submit {
	margin-top: 30px;
	text-align: center;
}

/* Custom Dropdown Styles */
.saf-custom-dropdown {
	position: relative;
	width: 100%;
}

.saf-dropdown-selected {
	width: 100%;
	padding: 1px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fff;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.3s;
	min-height: 36px;
	box-sizing: border-box;
}

.saf-dropdown-selected:hover {
	border-color: #999;
}

.saf-dropdown-selected:focus {
	outline: none;
}

.saf-dropdown-text {
	flex: 1;
	color: #333;
}

.saf-dropdown-text:empty::before {
	content: attr(data-placeholder);
	color: #999;
}

.saf-dropdown-arrow {
	color: #666;
	font-size: 12px;
	transition: transform 0.3s;
	margin-left: 10px;
}

.saf-custom-dropdown.saf-dropdown-open .saf-dropdown-arrow {
	transform: rotate(180deg);
}

.saf-dropdown-options {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: #fff;
	border: 1px solid #ddd;
	border-top: none;
	border-radius: 0 0 4px 4px;
	max-height: 200px;
	overflow-y: auto;
	z-index: 1000;
	display: none;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	margin-top: -1px;
}

.saf-custom-dropdown.saf-dropdown-open .saf-dropdown-options {
	display: block;
}

.saf-dropdown-option {
	padding: 10px 12px;
	cursor: pointer;
	transition: background-color 0.2s;
	font-size: 14px;
	color: #333;
}

.saf-dropdown-option:hover {
	background-color: #f5f5f5;
}

.saf-dropdown-option[aria-selected="true"] {
	background-color: #e8f4f8;
	font-weight: 500;
}

.saf-custom-dropdown.saf-error .saf-dropdown-selected {
	border-color: #dc3232;
}

.saf-custom-dropdown.saf-error .saf-dropdown-options {
	border-color: #dc3232;
}

.saf-submit-button {
	background-color: #0073aa;
	color: #fff;
	padding: 10px 40px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s;
}

.saf-submit-button:hover {
	background-color: #005177;
}

.saf-submit-button:disabled {
	background-color: #ccc;
	cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
	.saf-appointment-form {
		padding: 10px;
	}
	
	.saf-form {
		padding: 20px;
	}
	
	.saf-section-title {
		font-size: 18px;
	}
}

