/* ==========================================================================
   HM DAF Modal Styles
   ========================================================================== */

/* Overlay */
.hm-daf-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.30);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hm-daf-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Scroll lock */
html.hm-daf-scroll-lock,
html.hm-daf-scroll-lock body {
	overflow: hidden;
}

/* Modal */
.hm-daf-modal {
	position: relative;
	width: 90%;
	max-width: 540px;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
	padding: 40px;
	transform: scale(0.95);
	transition: transform 0.25s ease;
}

.hm-daf-overlay.active .hm-daf-modal {
	transform: scale(1);
}

/* Close button */
.hm-daf-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: #f0f0f0;
	color: #333;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
	padding: 0;
}

.hm-daf-close:hover,
.hm-daf-close:focus-visible {
	background: #ddd;
}

/* View switching */
.hm-daf-view {
	display: none;
}

.hm-daf-view--active {
	display: block;
}

/* Title & description */
.hm-daf-modal__title {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
}

.hm-daf-modal__desc {
	margin: 0 0 24px;
	font-size: 15px;
	color: #555;
	line-height: 1.5;
}

/* Search input */
.hm-daf-search {
	position: relative;
	margin-bottom: 24px;
}

.hm-daf-search__input {
	width: 100%;
	padding: 12px 16px;
	font-size: 16px;
	border: 2px solid #ddd;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.15s ease;
	box-sizing: border-box;
	background: #fff;
	color: #1a1a1a;
}

.hm-daf-search__input:focus {
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.hm-daf-search__input::placeholder {
	color: #999;
}

/* Results dropdown */
.hm-daf-results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 10;
	background: #fff;
	border: 1px solid #ddd;
	border-top: none;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	max-height: 320px;
	overflow-y: auto;
	display: none;
}

.hm-daf-results.active {
	display: block;
}

.hm-daf-results__item {
	padding: 12px 16px;
	cursor: pointer;
	transition: background 0.1s ease;
	border-bottom: 1px solid #f0f0f0;
}

.hm-daf-results__item:last-child {
	border-bottom: none;
}

.hm-daf-results__item:hover,
.hm-daf-results__item.hm-daf-results__item--highlighted {
	background: #f0f7fc;
}

.hm-daf-results__item-name {
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
	display: block;
}

.hm-daf-results__item-category {
	font-size: 12px;
	color: #888;
	margin-top: 2px;
	display: block;
}

.hm-daf-results__empty {
	padding: 16px;
	color: #888;
	font-size: 14px;
	text-align: center;
}

/* Instructions card */
.hm-daf-instructions {
	background: #f8f8f8;
	border-radius: 8px;
	padding: 20px 24px;
	margin-bottom: 20px;
}

.hm-daf-instructions__heading {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.hm-daf-instructions__list {
	margin: 0;
	padding-left: 20px;
}

.hm-daf-instructions__list li {
	font-size: 14px;
	color: #444;
	line-height: 1.6;
	margin-bottom: 4px;
}

.hm-daf-instructions__list li:last-child {
	margin-bottom: 0;
}

/* Can't find link */
.hm-daf-cant-find {
	margin: 0;
	font-size: 14px;
	color: #666;
	text-align: center;
}

.hm-daf-cant-find a {
	color: #0073aa;
	text-decoration: underline;
}

.hm-daf-cant-find a:hover {
	color: #005177;
}

/* Back button */
.hm-daf-back {
	display: inline-block;
	background: none;
	border: none;
	color: #0073aa;
	font-size: 14px;
	cursor: pointer;
	padding: 0;
	margin-bottom: 16px;
}

.hm-daf-back:hover {
	color: #005177;
	text-decoration: underline;
}

/* Contact form */
.hm-daf-form-group {
	margin-bottom: 16px;
}

.hm-daf-label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.hm-daf-input {
	width: 100%;
	padding: 10px 14px;
	font-size: 15px;
	border: 2px solid #ddd;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.15s ease;
	box-sizing: border-box;
	background: #fff;
	color: #1a1a1a;
}

.hm-daf-input:focus {
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.hm-daf-input.hm-daf-input--error {
	border-color: #d63638;
}

.hm-daf-submit {
	display: inline-block;
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: #0073aa;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.hm-daf-submit:hover {
	background: #005177;
}

.hm-daf-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Form messages */
.hm-daf-form-message {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.5;
}

.hm-daf-form-message--success {
	color: #00a32a;
}

.hm-daf-form-message--error {
	color: #d63638;
}

/* ==========================================================================
   Responsive — Full-screen modal on mobile
   ========================================================================== */
@media (max-width: 600px) {
	.hm-daf-modal {
		width: 100%;
		max-width: 100%;
		max-height: 100%;
		height: 100%;
		border-radius: 0;
		padding: 24px;
	}

	.hm-daf-overlay {
		align-items: stretch;
	}
}
