/* ==========================================================================
   VA Dental Finder — Frontend Styles
   ========================================================================== */

/* ---- Container ---- */
.vetdataapi-wrap {
	/* Style controls — override these via Settings > VA Dental Finder > Display & Style */
	--vda-theme:      #0071bb; /* button, header accent, focus ring, spinner, today hours */
	--vda-link:       #0071bb; /* directions, phone, and footer links */
	--vda-hover:      color-mix(in srgb, var(--vda-theme) 82%, #000); /* button & link hover — auto-darkens theme if not set */
	--vda-pill-hl-bg: #c6f6d5; /* highlighted (dental) service pill background */
	--vda-pill-bg:    #ebf8ff; /* secondary service pill background */

	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color: #2d3748;
	line-height: 1.5;
	max-width: 1200px;
	margin: 0 auto;
}

/* ---- Two-panel layout ---- */
.vetdataapi-layout {
	display: grid;
	grid-template-columns: 290px 1fr;
	gap: 24px;
	align-items: start;
}

@media (max-width: 820px) {
	.vetdataapi-layout {
		display: block; /* drop the grid entirely so panels stack as normal block elements */
	}

	.vetdataapi-filter-panel {
		position: relative !important; /* force override any sticky, including theme interference */
		margin-bottom: 24px;
	}
}

/* =========================================================================
   FILTER PANEL
   ========================================================================= */

.vetdataapi-filter-panel {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 20px;
	position: sticky;
	top: 20px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.vetdataapi-filter-panel h2 {
	font-size: 17px;
	font-weight: 700;
	color: #112e51;
	margin: 0 0 18px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--vda-theme);
	letter-spacing: -0.2px;
}

/* Form groups */
.vda-form-group {
	margin-bottom: 14px;
}

.vda-form-group fieldset {
	border: none;
	padding: 0;
	margin: 0;
}

.vda-label,
.vda-form-group legend.vda-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	color: #718096;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	margin-bottom: 5px;
}

.vda-form-group input[type="text"],
.vda-form-group select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #cbd5e0;
	border-radius: 5px;
	font-size: 14px;
	color: #2d3748;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
	-webkit-appearance: none;
	appearance: none;
}

.vda-form-group select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23718096' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	padding-right: 28px;
}

.vda-form-group input[type="text"]:focus,
.vda-form-group select:focus {
	outline: none;
	border-color: var(--vda-theme);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--vda-theme) 20%, transparent);
}

/* Radio group */
.vda-radio-group {
	display: flex;
	gap: 16px;
}

.vda-radio-group label {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 14px;
	color: #2d3748;
	cursor: pointer;
	font-weight: 500;
}

.vda-radio-group input[type="radio"] {
	cursor: pointer;
}

/* Checkbox label */
.vda-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.vda-checkbox-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: var(--vda-theme);
	flex-shrink: 0;
}

.vda-checkbox-label span {
	font-size: 14px;
	color: #2d3748;
	font-weight: 500;
}

.vda-hint {
	font-size: 11px;
	color: #a0aec0;
	margin: 4px 0 0 24px;
}

/* Search button */
.vda-search-btn {
	width: 100%;
	padding: 11px 16px;
	background: var(--vda-theme) !important;
	color: #ffffff !important;
	border: none;
	border-radius: 5px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
	margin-top: 6px;
	letter-spacing: 0.2px;
}

.vda-search-btn:hover,
.vda-search-btn:focus {
	background: var(--vda-hover) !important;
	color: #ffffff !important;
}

.vda-search-btn:active {
	transform: scale(0.99);
}

.vda-search-btn .btn-icon {
	margin-right: 4px;
}

/* =========================================================================
   RESULTS PANEL
   ========================================================================= */

.vetdataapi-results-panel {
	min-height: 200px;
}

.vetdataapi-results-panel.vda-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* Initial message */
.vda-initial-msg {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	color: #718096;
	font-size: 15px;
	text-align: center;
	background: #f7fafc;
	border: 2px dashed #e2e8f0;
	border-radius: 10px;
	padding: 32px;
}

.vda-initial-msg p {
	margin: 0;
}

/* Error / notice */
.vda-error {
	background: #fff5f5;
	border: 1px solid #fc8181;
	border-left: 4px solid #e53e3e;
	border-radius: 6px;
	padding: 12px 16px;
	color: #c53030;
	font-size: 14px;
	margin-bottom: 16px;
}

/* Info notice (non-error informational messages) */
.vda-info-notice {
	background: #ebf8ff;
	border-left: 3px solid #63b3ed;
	border-radius: 4px;
	padding: 8px 12px;
	color: #2c5282;
	font-size: 13px;
	margin-bottom: 12px;
}

/* Spinner */
#vda-spinner {
	text-align: center;
	padding: 48px 0;
	color: #718096;
}

.vda-spinner-ring {
	display: inline-block;
	width: 40px;
	height: 40px;
	border: 4px solid #e2e8f0;
	border-top-color: var(--vda-theme);
	border-radius: 50%;
	animation: vda-spin 0.75s linear infinite;
	margin-bottom: 12px;
}

@keyframes vda-spin {
	to { transform: rotate(360deg); }
}

/* Result count */
.vda-result-count {
	font-size: 13px;
	color: #718096;
	margin: 0 0 14px;
	font-style: italic;
}

/* =========================================================================
   FACILITY CARDS
   ========================================================================= */

.vda-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	margin-bottom: 16px;
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.vda-card:hover {
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
}

/* Card header */
.vda-card-header {
	background: #f8fafc;
	padding: 14px 18px;
	border-bottom: 1px solid #e2e8f0;
}

.vda-title-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
	flex-wrap: wrap;
}

.vda-facility-name {
	font-size: 17px;
	font-weight: 700;
	color: #112e51;
	margin: 0;
	flex: 1;
	line-height: 1.3;
}

.vda-card-badges {
	display: flex;
	gap: 6px;
	align-items: center;
	flex-shrink: 0;
	flex-wrap: wrap;
}

.vda-facility-type {
	font-size: 12px;
	color: #a0aec0;
	margin-top: 3px;
}

/* Status badges */
.vda-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 20px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	white-space: nowrap;
}

.vda-status-normal   { background: #e6fffa; color: #276749; }
.vda-status-notice   { background: #ebf8ff; color: #2b6cb0; }
.vda-status-limited  { background: #fffaf0; color: #c05621; }
.vda-status-closed   { background: #fff5f5; color: #c53030; }
.vda-status-virtual  { background: #faf5ff; color: #6b46c1; }
.vda-status-soon     { background: #f0fff4; color: #276749; }

.vda-distance-badge {
	display: inline-block;
	padding: 3px 9px;
	background: #ebf4ff;
	color: #2b6cb0;
	border-radius: 20px;
	font-size: 10px;
	font-weight: 700;
	white-space: nowrap;
}

/* Mobile warning */
.vda-mobile-warning {
	background: #fffff0;
	border: 1px solid #f6e05e;
	border-radius: 4px;
	padding: 5px 10px;
	font-size: 11px;
	color: #744210;
	margin-top: 8px;
}

/* Operating status additional info */
.vda-status-info {
	font-size: 12px;
	color: #718096;
	margin-top: 5px;
	font-style: italic;
}

/* Card body — 3-column grid */
.vda-card-body {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 680px) {
	.vda-card-body {
		grid-template-columns: 1fr;
	}
}

.vda-card-section {
	padding: 14px 18px;
	border-right: 1px solid #e2e8f0;
}

.vda-card-section:last-child {
	border-right: none;
}

@media (max-width: 680px) {
	.vda-card-section {
		border-right: none;
		border-bottom: 1px solid #e2e8f0;
	}
	.vda-card-section:last-child {
		border-bottom: none;
	}
}

.vda-section-label {
	font-size: 10px;
	font-weight: 700;
	color: #a0aec0;
	text-transform: uppercase;
	letter-spacing: 0.7px;
	margin: 0 0 8px;
}

/* Address */
.vda-address {
	font-size: 13px;
	line-height: 1.7;
	color: #4a5568;
	margin-bottom: 8px;
}

.vda-directions-link {
	font-size: 12px;
	color: var(--vda-link) !important;
	text-decoration: none;
	font-weight: 500;
}

.vda-directions-link:hover {
	text-decoration: underline;
}

/* Phone */
.vda-phone-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	font-size: 13px;
	margin-bottom: 5px;
}

.vda-phone-label {
	font-size: 10px;
	font-weight: 700;
	color: #a0aec0;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	flex-shrink: 0;
}

.vda-phone-row a {
	color: var(--vda-link) !important;
	text-decoration: none;
	font-weight: 500;
}

.vda-phone-row a:hover {
	text-decoration: underline;
}

.vda-extra-phones {
	margin-top: 4px;
}

/* Hours */
.vda-today-hours {
	font-size: 13px;
	color: #4a5568;
	margin-bottom: 6px;
}

.vda-today-hours strong {
	color: #2d3748;
}

.vda-hours-table {
	width: 100%;
	font-size: 12px;
	border-collapse: collapse;
	margin: 4px 0;
}

.vda-hours-table td {
	padding: 2px 0;
	color: #718096;
	vertical-align: top;
}

.vda-hours-table td:first-child {
	font-weight: 600;
	color: #4a5568;
	width: 84px;
}

.vda-hours-table tr.vda-today-row td {
	color: var(--vda-theme);
	font-weight: 700;
}

/* Services */
.vda-card-services {
	padding: 10px 18px 14px;
	border-top: 1px solid #e2e8f0;
}

.vda-services-list {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 6px;
}

.vda-service-pill {
	display: inline-block;
	padding: 2px 10px;
	background: var(--vda-pill-bg);
	color: #2b6cb0;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
}

/* Dental service pill — always highlighted and shown first */
.vda-service-pill--dental {
	background: var(--vda-pill-hl-bg);
	color: #22543d;
	border: 1px solid #68d391;
	font-weight: 700;
}

/* "Show N more services" toggle link */
.vda-services-toggle {
	display: inline-block;
	background: none;
	border: none;
	color: #718096;
	font-size: 11px;
	cursor: pointer;
	padding: 2px 4px;
	text-decoration: underline;
	vertical-align: middle;
}
.vda-services-toggle:hover { color: #2d3748; }

/* Card footer */
.vda-card-footer {
	padding: 9px 18px;
	border-top: 1px solid #e2e8f0;
	background: #fafafa;
	font-size: 12px;
	display: flex;
	gap: 16px;
	align-items: center;
	flex-wrap: wrap;
}

.vda-card-footer a {
	color: var(--vda-link) !important;
	text-decoration: none;
	font-weight: 500;
}

.vda-card-footer a:hover {
	text-decoration: underline;
}

.vda-no-data {
	font-size: 12px;
	color: #cbd5e0;
	font-style: italic;
	margin: 0;
}

/* =========================================================================
   TOGGLE BUTTONS (collapsible sections)
   ========================================================================= */

.vda-toggle-btn {
	background: none;
	border: none;
	color: var(--vda-link);
	font-size: 12px;
	cursor: pointer;
	padding: 0;
	margin-top: 5px;
	display: block;
	text-decoration: underline;
	font-weight: 500;
}

.vda-toggle-btn:hover {
	color: var(--vda-hover);
}

.vda-hidden {
	display: none;
}

/* =========================================================================
   PAGINATION
   ========================================================================= */

.vda-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 20px 0 8px;
}

.vda-page-btn {
	padding: 8px 18px;
	background: var(--vda-theme) !important;
	color: #ffffff !important;
	border: none;
	border-radius: 5px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.vda-page-btn:hover,
.vda-page-btn:focus {
	background: var(--vda-hover) !important;
	color: #ffffff !important;
}

.vda-page-indicator {
	font-size: 13px;
	color: #718096;
}

/* =========================================================================
   ADMIN NOTICE (shown to admins when API key missing)
   ========================================================================= */

.vetdataapi-notice {
	background: #fffbeb;
	border: 1px solid #f6ad55;
	border-left: 4px solid #dd6b20;
	border-radius: 6px;
	padding: 12px 16px;
	color: #7b341e;
	font-size: 14px;
}

.vetdataapi-notice a {
	color: #0071bb;
}
/* =========================================================================
   SOURCE BADGES (VA / NHSC / Added)
   ========================================================================= */

.vda-source-badge {
        display: inline-block;
        padding: 2px 7px;
        border-radius: 3px;
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        vertical-align: middle;
}

.vda-source-va      { background: #1a4480; color: #fff; }
.vda-source-manual  { background: #7d4e9e; color: #fff; }
.vda-source-partner { background: #565c65; color: #fff; }