/**
 * Hospital Tool frontend structural styles.
 *
 * These styles provide only the minimum structure needed for grids, sliders,
 * pagination, and doctor detail pages. Themes should override the visual design.
 */

.hospital-tool-doctors {
	box-sizing: border-box;
}

.hospital-tool-doctors-grid {
	display: grid;
	gap: 1.5rem;
}

.hospital-tool-doctor-card {
	box-sizing: border-box;
}

/* Fixed portrait visual box for the legacy [hospital_tool_doctors] card.
 * Source image is 'medium' (proportional, never hard-cropped — see
 * templates/frontend/doctors/card.php); this box only controls layout
 * stability, so object-fit:contain always keeps the complete image
 * visible, letterboxed if its real ratio isn't exactly 2:3. */
.hospital-tool-doctor-image {
	width: 100%;
	aspect-ratio: 2 / 3;
}

.hospital-tool-doctor-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.hospital-tool-slider {
	overflow: hidden;
}

.hospital-tool-slider-track {
	display: flex;
	transition: transform 0.3s ease;
}

.hospital-tool-slider-item {
	box-sizing: border-box;
	padding: 0 0.5rem;
	min-width: 0;
}

.hospital-tool-slider-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

.hospital-tool-slider-dot {
	width: 10px;
	height: 10px;
	border: none;
	border-radius: 50%;
	background: #ccc;
	cursor: pointer;
}

.hospital-tool-slider-dot.is-active {
	background: #333;
}

.hospital-tool-pagination {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

.hospital-tool-doctor-detail img {
	max-width: 100%;
	height: auto;
}

/* Doctor Details layout structure only (templates/frontend/doctors/detail.php):
 * Degree | Specialisation side by side, information cards in up to three
 * columns (fewer as space narrows), and the Operating Hours lists without
 * bullets. Colors, typography and spacing are left to the site/theme.
 * !important only where Divi's #left-area list rules would otherwise win. */
.hospital-tool-doctor-detail__credentials {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.hospital-tool-doctor-detail__credential {
	flex: 1 1 200px;
	min-width: 0;
}

.hospital-tool-doctor-detail__info-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.5rem;
}

.hospital-tool-doctor-detail__info-card {
	box-sizing: border-box;
	min-width: 0;
}

.hospital-tool-doctor-detail .hospital-tool-doctor-detail__hours,
.hospital-tool-doctor-detail .hospital-tool-doctor-detail__days {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.hospital-tool-doctor-detail .hospital-tool-doctor-detail__days {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem !important;
}

.hospital-tool-doctor-detail__day {
	opacity: 0.4;
}

.hospital-tool-doctor-detail__day.is-available {
	opacity: 1;
	font-weight: 700;
}

/* Separation between the stacked sections, and long words/URLs wrap
 * instead of pushing past the viewport on narrow screens. */
.hospital-tool-doctor-detail {
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.hospital-tool-doctor-detail__header,
.hospital-tool-doctor-detail__info-cards,
.hospital-tool-doctor-detail__about,
.hospital-tool-doctor-detail .hospital-tool-doctor__social,
.hospital-tool-doctor-detail .hospital-tool-doctor__languages {
	margin-bottom: 1.5rem;
}

.hospital-tool-doctor__social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

/**
 * Patient Appointment modal — structural/usability rules only (centering,
 * visibility, internal scroll, responsive sizing, body scroll lock). No
 * brand color, typography, button styling, radius, or shadow is defined
 * here: that is left entirely to the site/theme, per the module's own
 * "functional structure, not final visual design" rule. Every selector is
 * namespaced to "hospital-tool-appointment-*" and cannot affect any other
 * form/modal on the site.
 */
.hospital-tool-appointment-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 16px;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	box-sizing: border-box;
}

.hospital-tool-appointment-overlay[hidden] {
	display: none;
}

.hospital-tool-appointment-modal {
	position: relative;
	width: 100%;
	max-width: 600px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	overflow-x: hidden;
	box-sizing: border-box;
	padding: 24px;
}

/* Toggled on <body> by appointment.js while the modal is open, to prevent
 * the background page from scrolling; removed again on close. */
body.hospital-tool-appointment-modal-open {
	overflow: hidden;
}

/* Placement only (block-level, under the textarea) — no color/size/weight. */
.hospital-tool-appointment-counter {
	display: block;
}

/* Post-submission success notification, shown by appointment.js after the
 * modal auto-closes. New element/class only — no existing appointment
 * selector is touched. Krishna Eye Centre primary blue. */
.hospital-tool-appointment-toast {
	position: fixed !important;
	left: 50% !important;
	bottom: 30px !important;
	transform: translateX(-50%) !important;
	width: auto !important;
	max-width: calc(100% - 40px) !important;
	padding: 13px 22px !important;
	background: #1E73BE !important;
	color: #FFFFFF !important;
	border-radius: 6px !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
	font-weight: 500 !important;
	text-align: center !important;
	box-shadow: 0 8px 25px rgba(30, 115, 190, 0.28) !important;
	z-index: 1000000 !important;
	box-sizing: border-box !important;
}

.hospital-tool-appointment-toast[hidden] {
	display: none !important;
}

@media (max-width: 600px) {
	.hospital-tool-appointment-toast {
		left: 15px !important;
		right: 15px !important;
		bottom: 20px !important;
		transform: none !important;
		width: auto !important;
		max-width: none !important;
		padding: 12px 16px !important;
		font-size: 13px !important;
	}
}

@media (max-width: 767px) {
	.hospital-tool-appointment-overlay {
		padding: 10px;
	}

	.hospital-tool-appointment-modal {
		max-width: 100%;
		max-height: calc(100vh - 20px);
		padding: 16px;
	}
}
