/**
 * Doctor Profile — Single & Modal (production UI)
 */

.dap-profile-view {
	--dap-navy: #0c2340;
	--dap-navy-soft: #1a3a5c;
	--dap-accent: #0ea5e9;
	--dap-accent-dark: #0284c7;
	--dap-accent-soft: #e0f2fe;
	--dap-bg: #f4f7fb;
	--dap-surface: #ffffff;
	--dap-border: #e2e8f0;
	--dap-muted: #64748b;
	--dap-text: #334155;
	--dap-radius-lg: 20px;
	--dap-radius-md: 14px;
	--dap-radius-sm: 10px;
	--dap-shadow-sm: 0 1px 2px rgba(12, 35, 64, 0.06);
	--dap-shadow-md: 0 12px 32px rgba(12, 35, 64, 0.08);
	--dap-shadow-lg: 0 24px 48px rgba(12, 35, 64, 0.1);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--dap-text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

/* ─── Single page layout ─── */
.dap-profile-shell {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.dap-profile-aside {
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.dap-profile-card {
	background: var(--dap-surface);
	border: 1px solid var(--dap-border);
	border-radius: var(--dap-radius-lg);
	box-shadow: var(--dap-shadow-sm);
	overflow: hidden;
}

.dap-profile-card-photo {
	position: relative;
	padding: 0;
}

.dap-profile-photo-frame {
	aspect-ratio: 4 / 5;
	background: linear-gradient(160deg, #e8f4fc 0%, #f8fafc 100%);
	overflow: hidden;
}

.dap-profile-photo-frame img,
.dap-profile-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dap-profile-photo-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
}

.dap-profile-photo-placeholder svg {
	width: 64px;
	height: 64px;
}

.dap-profile-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	line-height: 1;
}

.dap-profile-card-photo .dap-profile-badge {
	position: absolute;
	bottom: 14px;
	left: 14px;
	box-shadow: var(--dap-shadow-sm);
}

.dap-availability-available {
	background: #dcfce7;
	color: #166534;
}

.dap-availability-unavailable,
.dap-availability-on-leave {
	background: #fee2e2;
	color: #991b1b;
}

.dap-profile-card-book {
	padding: 22px;
}

.dap-profile-fee {
	margin-bottom: 18px;
	padding-bottom: 18px;
	border-bottom: 1px dashed var(--dap-border);
}

.dap-profile-fee-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--dap-muted);
	margin-bottom: 4px;
}

.dap-profile-fee-value {
	display: block;
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--dap-navy);
	letter-spacing: -0.02em;
}

.dap-profile-book-wrap .dap-appointment-button,
.dap-profile-view .dap-appointment-button {
	display: block;
	width: 100%;
	padding: 14px 20px;
	background: linear-gradient(135deg, var(--dap-accent) 0%, var(--dap-accent-dark) 100%);
	color: #fff !important;
	border: none;
	border-radius: var(--dap-radius-sm);
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dap-profile-book-wrap .dap-appointment-button:hover,
.dap-profile-view .dap-appointment-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
	color: #fff !important;
}

.dap-profile-book-note {
	display: none;
}

.dap-info-row dd a {
	color: var(--dap-accent-dark);
	text-decoration: none;
	font-weight: 600;
}

.dap-info-row dd a:hover {
	text-decoration: underline;
}

/* ─── Main content ─── */
.dap-profile-content {
	min-width: 0;
}

.dap-profile-header {
	margin-bottom: 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--dap-border);
}

.dap-profile-eyebrow {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--dap-accent-dark);
}

.dap-profile-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.dap-profile-eyebrow a:hover {
	text-decoration: underline;
}

.dap-profile-name {
	margin: 0 0 10px;
	font-size: clamp(1.875rem, 4vw, 2.75rem);
	font-weight: 800;
	color: var(--dap-navy);
	line-height: 1.12;
	letter-spacing: -0.03em;
}

.dap-profile-subtitle {
	margin: 0 0 16px;
	font-size: 1.125rem;
	color: var(--dap-muted);
	line-height: 1.55;
	max-width: 640px;
}

.dap-profile-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dap-profile-tag {
	display: inline-block;
	padding: 6px 14px;
	background: var(--dap-accent-soft);
	color: var(--dap-accent-dark);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
}

.dap-profile-blocks {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.dap-profile-block {
	background: var(--dap-surface);
	border: 1px solid var(--dap-border);
	border-radius: var(--dap-radius-lg);
	padding: 24px 28px;
	box-shadow: var(--dap-shadow-sm);
}

.dap-profile-block-head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f1f5f9;
}

.dap-profile-block-icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--dap-accent-soft);
	color: var(--dap-accent-dark);
	border-radius: 12px;
}

.dap-profile-block-icon svg {
	width: 20px;
	height: 20px;
}

.dap-profile-block-head h2 {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--dap-navy);
	letter-spacing: -0.01em;
}

.dap-profile-prose {
	font-size: 16px;
	line-height: 1.75;
	color: var(--dap-text);
}

.dap-profile-prose p:last-child {
	margin-bottom: 0;
}

.dap-profile-prose h2,
.dap-profile-prose h3,
.dap-profile-prose h4 {
	color: var(--dap-navy);
	margin-top: 1.5em;
}

/* ─── Details grid ─── */
.dap-details-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.dap-detail-item {
	padding: 16px 18px;
	background: #f8fafc;
	border: 1px solid #f1f5f9;
	border-radius: var(--dap-radius-sm);
}

.dap-detail-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--dap-muted);
	margin-bottom: 6px;
}

.dap-detail-value {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: var(--dap-navy);
	line-height: 1.45;
}

.dap-detail-value a {
	color: var(--dap-accent-dark);
	text-decoration: none;
	font-weight: 600;
}

.dap-detail-value a:hover {
	text-decoration: underline;
}

/* ─── Additional info table ─── */
.dap-info-table {
	margin: 0;
}

.dap-info-row {
	display: grid;
	grid-template-columns: minmax(140px, 34%) 1fr;
	gap: 12px 20px;
	padding: 14px 0;
	border-bottom: 1px solid #f1f5f9;
}

.dap-info-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.dap-info-row dt {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: var(--dap-navy);
}

.dap-info-row dd {
	margin: 0;
	font-size: 15px;
	color: var(--dap-text);
	line-height: 1.55;
}

/* ─── Schedule ─── */
.dap-schedule-table {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.dap-schedule-row {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 16px;
	align-items: center;
	padding: 14px 16px;
	background: #f8fafc;
	border: 1px solid #f1f5f9;
	border-radius: var(--dap-radius-sm);
}

.dap-schedule-day {
	font-weight: 700;
	font-size: 14px;
	color: var(--dap-navy);
}

.dap-schedule-slots {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dap-slot-pill {
	display: inline-block;
	padding: 5px 12px;
	background: var(--dap-surface);
	border: 1px solid var(--dap-accent-soft);
	color: var(--dap-accent-dark);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.dap-schedule-holidays {
	margin-top: 16px;
	padding: 14px 16px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: var(--dap-radius-sm);
	font-size: 14px;
	line-height: 1.55;
	color: #92400e;
}

.dap-schedule-holidays strong {
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ─── Mobile sticky CTA ─── */
.dap-profile-mobile-cta {
	display: none;
}

/* ─── Modal overrides ─── */
.dap-profile-view-modal {
	padding: 0;
}

.dap-modal-profile-top {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin-bottom: 22px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--dap-border);
}

.dap-modal-photo-wrap {
	flex-shrink: 0;
	width: 96px;
	height: 96px;
	border-radius: 16px;
	overflow: hidden;
	background: #f1f5f9;
	border: 2px solid var(--dap-surface);
	box-shadow: var(--dap-shadow-sm);
}

.dap-modal-doctor-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dap-modal-profile-intro {
	flex: 1;
	min-width: 0;
}

.dap-modal-profile-name {
	margin: 0 0 6px;
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--dap-navy);
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.dap-modal-excerpt {
	margin: 0 0 12px;
	font-size: 15px;
	color: var(--dap-muted);
	line-height: 1.5;
}

.dap-modal-profile-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.dap-modal-fee-chip {
	padding: 5px 12px;
	background: var(--dap-accent-soft);
	color: var(--dap-accent-dark);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
}

.dap-profile-view-modal .dap-modal-tabs-nav {
	display: flex;
	width: 100%;
	background: #f1f5f9;
	padding: 5px;
	border-radius: 14px;
	gap: 4px;
	margin-bottom: 18px;
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.dap-profile-view-modal .dap-tab-btn {
	flex: 1 0 auto;
	padding: 10px 16px;
	border: none;
	background: transparent;
	color: var(--dap-muted);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	border-radius: 10px;
	white-space: nowrap;
	transition: all 0.2s ease;
}

.dap-profile-view-modal .dap-tab-btn:hover {
	color: var(--dap-navy);
}

.dap-profile-view-modal .dap-tab-btn.active {
	background: var(--dap-surface);
	color: var(--dap-navy);
	box-shadow: var(--dap-shadow-sm);
}

.dap-profile-view-modal .dap-tab-content {
	display: none;
}

.dap-profile-view-modal .dap-tab-content.active {
	display: block;
	animation: dapProfileFadeIn 0.25s ease;
}

@keyframes dapProfileFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.dap-profile-view-modal .dap-modal-doctor-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid var(--dap-border);
}

.dap-profile-view-modal .dap-modal-doctor-footer .dap-appointment-button {
	flex: 1;
	min-width: 160px;
}

.dap-profile-view-modal .dap-button-secondary {
	flex: 1;
	min-width: 120px;
	padding: 14px 20px;
	background: #f1f5f9 !important;
	color: var(--dap-navy) !important;
	border-radius: var(--dap-radius-sm);
	font-weight: 600;
	text-align: center;
	text-decoration: none !important;
	border: 1px solid var(--dap-border);
}

.dap-profile-view-modal .dap-button-secondary:hover {
	background: #e2e8f0 !important;
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
	.dap-profile-shell {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.dap-profile-aside {
		position: static;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 16px;
	}

	.dap-profile-card-photo {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	.dap-profile-aside {
		grid-template-columns: 1fr;
	}

	.dap-profile-photo-frame {
		aspect-ratio: 16 / 10;
		max-height: 280px;
	}

	.dap-details-grid {
		grid-template-columns: 1fr;
	}

	.dap-info-row {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.dap-schedule-row {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.dap-profile-block {
		padding: 20px 18px;
	}

	.dap-profile-mobile-cta {
		display: block;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 99990;
		padding: 12px 16px;
		background: rgba(255, 255, 255, 0.96);
		border-top: 1px solid var(--dap-border);
		box-shadow: 0 -8px 24px rgba(12, 35, 64, 0.08);
		backdrop-filter: blur(8px);
	}

	.dap-profile-mobile-cta .dap-appointment-button {
		width: 100%;
	}
}
