/**
 * Package Modal Styles
 *
 * Built on the Doctor Modal backdrop & overlay system with package-specific layouts.
 *
 * @package Doctor_Appointment
 */

.dap-package-modal .dap-doctor-modal-content {
	max-width: 780px;
	width: 100%;
	padding: 0 !important;
	border-radius: 20px;
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
	height: 88vh !important;
	max-height: 88vh !important;
	background: #ffffff;
	position: relative;
	box-sizing: border-box;
}

/* Ensure intermediate containers fill height and allow flex children to shrink & scroll */
.dap-package-modal .dap-package-modal-body,
.dap-package-modal #dap-package-modal-body {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	min-height: 0 !important;
	height: 100% !important;
	overflow: hidden !important;
}

.dap-package-modal .dap-pkg-modal-container {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	min-height: 0 !important;
	height: 100% !important;
	overflow: hidden !important;
}

/* Modal Top Hero / Summary Banner (fixed at top) */
.dap-pkg-modal-hero {
	flex-shrink: 0 !important;
	background: linear-gradient(135deg, #0c2340 0%, #1e3a5f 100%);
	color: #ffffff;
	padding: 24px 32px 20px;
	position: relative;
}

.dap-pkg-modal-badges {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.dap-pkg-modal-code {
	display: inline-block;
	background: #fde047;
	color: #0f172a;
	font-size: 12px;
	font-weight: 800;
	padding: 4px 10px;
	border-radius: 6px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.dap-pkg-modal-tests-count {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.15);
	color: #e0f2fe;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.dap-pkg-modal-title {
	margin: 0 0 6px;
	font-size: clamp(1.4rem, 3vw, 1.85rem);
	font-weight: 800;
	color: #ffffff;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.dap-pkg-modal-subtitle {
	margin: 0 0 16px;
	font-size: 14px;
	color: #94a3b8;
	display: flex;
	align-items: center;
	gap: 6px;
}

.dap-pkg-modal-price-row {
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	padding-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.dap-pkg-modal-price {
	font-size: 1.75rem;
	font-weight: 800;
	color: #38bdf8;
	line-height: 1;
}

.dap-pkg-modal-regular {
	font-size: 14px;
	color: #94a3b8;
}

.dap-pkg-modal-regular del {
	text-decoration: line-through;
}

.dap-pkg-modal-savings {
	background: rgba(34, 197, 94, 0.2);
	color: #4ade80;
	border: 1px solid rgba(74, 222, 128, 0.35);
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 999px;
	text-transform: uppercase;
}

/* Tabs Navigation (fixed bar) */
.dap-pkg-modal-tabs-nav {
	flex-shrink: 0 !important;
	display: flex;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	padding: 0 24px;
	gap: 8px;
	overflow-x: auto;
}

.dap-pkg-modal-tabs-nav .dap-tab-btn {
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	color: #64748b;
	font-size: 14px;
	font-weight: 700;
	padding: 14px 16px;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s ease;
}

.dap-pkg-modal-tabs-nav .dap-tab-btn:hover {
	color: #0284c7;
}

.dap-pkg-modal-tabs-nav .dap-tab-btn.active {
	color: #0284c7;
	border-bottom-color: #0284c7;
	background: #ffffff;
}

/* Tabs Content Body (scrollable) */
.dap-pkg-modal-body-scroll {
	padding: 24px 32px;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch;
	flex: 1 1 auto !important;
	min-height: 0 !important;
	background: #ffffff;
	box-sizing: border-box;
}

.dap-pkg-modal-body-scroll::-webkit-scrollbar {
	width: 8px;
}

.dap-pkg-modal-body-scroll::-webkit-scrollbar-track {
	background: #f1f5f9;
}

.dap-pkg-modal-body-scroll::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 99px;
}

.dap-pkg-modal-body-scroll::-webkit-scrollbar-thumb:hover {
	background: #0284c7;
}

.dap-package-modal .dap-doctor-modal-close {
	z-index: 10 !important;
}

.dap-pkg-modal-tab-content {
	display: none;
}

.dap-pkg-modal-tab-content.active {
	display: block;
}

/* Investigations Categories & Checklist */
.dap-pkg-modal-investigations {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.dap-pkg-modal-category-group {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 16px 20px;
}

.dap-pkg-modal-category-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e2e8f0;
}

.dap-pkg-modal-category-title {
	font-size: 15px;
	font-weight: 800;
	color: #0c2340;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.dap-pkg-modal-category-badge {
	font-size: 11px;
	font-weight: 700;
	background: #e0f2fe;
	color: #0284c7;
	padding: 2px 8px;
	border-radius: 999px;
}

.dap-pkg-modal-tests-checklist {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.dap-pkg-modal-test-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13.5px;
	color: #1e293b;
	line-height: 1.45;
}

.dap-pkg-modal-test-icon {
	width: 18px;
	height: 18px;
	min-width: 18px;
	border-radius: 50%;
	background: #dcfce7;
	color: #16a34a;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 1px;
}

.dap-pkg-modal-test-icon svg {
	width: 12px;
	height: 12px;
}

/* Clinical Overview Section */
.dap-pkg-modal-section-title {
	font-size: 16px;
	font-weight: 800;
	color: #0c2340;
	margin: 0 0 12px;
}

.dap-pkg-modal-prose {
	font-size: 14px;
	color: #475569;
	line-height: 1.65;
	margin-bottom: 24px;
}

.dap-pkg-modal-checklist {
	list-style: none !important;
	margin: 0 0 24px 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dap-pkg-modal-checklist li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13.5px;
	color: #334155;
	line-height: 1.45;
}

.dap-pkg-modal-checklist-icon {
	color: #0ea5e9;
	margin-top: 2px;
	flex-shrink: 0;
}

/* Instructions Banner */
.dap-pkg-modal-instructions-box {
	background: #fffbeb;
	border: 1px solid #fef3c7;
	border-left: 4px solid #f59e0b;
	border-radius: 12px;
	padding: 16px 20px;
	margin-bottom: 20px;
}

.dap-pkg-modal-instructions-box h4 {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 800;
	color: #92400e;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Modal Footer Actions (fixed docked at bottom) */
.dap-pkg-modal-footer {
	flex-shrink: 0 !important;
	position: relative !important;
	z-index: 10 !important;
	padding: 18px 32px;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.04) !important;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	box-sizing: border-box;
}

.dap-pkg-modal-footer-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.dap-pkg-modal-btn-book {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
	color: #ffffff !important;
	padding: 11px 22px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(2, 132, 199, 0.28);
	transition: all 0.2s ease;
}

.dap-pkg-modal-btn-book:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(2, 132, 199, 0.38);
	color: #ffffff !important;
}

.dap-pkg-modal-btn-full {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #64748b;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	padding: 10px 14px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	background: #ffffff;
	transition: all 0.2s ease;
}

.dap-pkg-modal-btn-full:hover {
	color: #0284c7;
	border-color: #0284c7;
	background: #f0f9ff;
}

@media (max-width: 640px) {
	.dap-pkg-modal-hero {
		padding: 22px 20px;
	}

	.dap-pkg-modal-body-scroll {
		padding: 18px 20px;
	}

	.dap-pkg-modal-footer {
		padding: 14px 20px;
		flex-direction: column;
		align-items: stretch;
	}

	.dap-pkg-modal-footer-actions {
		flex-direction: column;
	}

	.dap-pkg-modal-btn-book,
	.dap-pkg-modal-btn-full {
		justify-content: center;
		width: 100%;
	}
}

@media (max-height: 720px) {
	.dap-package-modal .dap-doctor-modal-content {
		height: 94vh !important;
		max-height: 94vh !important;
	}
	.dap-pkg-modal-hero {
		padding: 16px 24px 14px !important;
	}
	.dap-pkg-modal-title {
		font-size: 1.35rem !important;
		margin-bottom: 4px !important;
	}
	.dap-pkg-modal-subtitle {
		margin-bottom: 8px !important;
	}
	.dap-pkg-modal-body-scroll {
		padding: 16px 24px !important;
	}
	.dap-pkg-modal-footer {
		padding: 12px 24px !important;
	}
}
