/* ==========================================================================
   Pixelworks Doctor Directory — Frontend Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Screen-reader only utility (accessibility)
   -------------------------------------------------------------------------- */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Directory wrapper + single profile — shared design tokens
   -------------------------------------------------------------------------- */
.pdd-directory,
.pdd-single-doctor {
	--pdd-primary:     #3753a4;
	--pdd-primary-dk:  #1d2b53;
	--pdd-text:        #1a1a2e;
	--pdd-muted:       #6b7280;
	--pdd-border:      #e5e7eb;
	--pdd-bg:          #ffffff;
	--pdd-bg-hover:    #f3f6fb;
	--pdd-radius:      10px;
	font-family: inherit;
	color: var(--pdd-text);
}

/* --------------------------------------------------------------------------
   Filter bar
   -------------------------------------------------------------------------- */
.pdd-filters {
	display: flex;
	flex-wrap: nowrap;
	gap: 12px;
	margin-bottom: 20px;
	align-items: center;
}

.pdd-search-wrap {
	flex: 1 1 0;
	min-width: 0;
}

.pdd-search {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--pdd-border);
	border-radius: var(--pdd-radius);
	font-size: 15px;
	line-height: 1.4;
	box-sizing: border-box;
	transition: border-color 0.15s;
	background: var(--pdd-bg);
}

.pdd-search:focus {
	outline: none;
	border-color: var(--pdd-primary);
	box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.15);
}

.pdd-selects {
	display: flex;
	flex: 2 1 0;
	gap: 10px;
	flex-wrap: nowrap;
	min-width: 0;
}

.pdd-select {
	flex: 1 1 0;
	min-width: 0;
	padding: 10px 14px;
	border: 1px solid var(--pdd-border);
	border-radius: var(--pdd-radius);
	font-size: 15px;
	background: var(--pdd-bg);
	cursor: pointer;
	transition: border-color 0.15s;
}

.pdd-select:focus {
	outline: none;
	border-color: var(--pdd-primary);
	box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.15);
}

/* --------------------------------------------------------------------------
   Results info line
   -------------------------------------------------------------------------- */
.pdd-results-info {
	font-size: 14px;
	color: var(--pdd-muted);
	margin-bottom: 16px;
	min-height: 20px;
}

/* --------------------------------------------------------------------------
   Doctor grid
   --pdd-grid-columns is set inline by JS from the admin column setting.
   -------------------------------------------------------------------------- */
.pdd-grid {
	--pdd-grid-columns: 3;
	display: grid;
	grid-template-columns: repeat(var(--pdd-grid-columns), 1fr);
	gap: 24px;
	min-height: 200px;
}

/* Loading state */
.pdd-loading {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 60px 0;
}

.pdd-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid var(--pdd-border);
	border-top-color: var(--pdd-primary);
	border-radius: 50%;
	animation: pdd-spin 0.7s linear infinite;
	display: block;
}

@keyframes pdd-spin {
	to { transform: rotate(360deg); }
}

/* No-results message */
.pdd-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 0;
	color: var(--pdd-muted);
	font-size: 16px;
}

/* Error message */
.pdd-error {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 0;
	color: #dc2626;
	font-size: 15px;
}

/* --------------------------------------------------------------------------
   Doctor card
   -------------------------------------------------------------------------- */
.pdd-card {
	background: var(--pdd-bg);
	border: 1px solid var(--pdd-border);
	border-radius: var(--pdd-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pdd-card:hover {
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
	transform: translateY(-2px);
}

/* Photo area */
.pdd-card-link {
	text-decoration: none;
	color: inherit;
	display: block;
	flex: 1;
}

.pdd-card-photo {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: center top;
	display: block;
	background: var(--pdd-bg-hover);
}

.pdd-card-photo-placeholder {
	width: 100%;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, #e8f0fe 0%, #cde0ff 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.pdd-card-photo-placeholder svg {
	width: 56px;
	height: 56px;
	color: #7baee8;
	opacity: 0.7;
}

/* Card body */
.pdd-card-body {
	padding: 16px 16px 12px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.pdd-card-name {
	font-size: 17px;
	font-weight: 700;
	color: var(--pdd-text);
	line-height: 1.3;
	margin: 0;
}

.pdd-card-degrees {
	font-size: 13px;
	color: var(--pdd-muted);
	font-weight: 400;
}

.pdd-card-specialties {
	font-size: 13px;
	color: var(--pdd-primary);
	font-weight: 600;
	margin: 0;
}

.pdd-card-locations {
	font-size: 13px;
	color: var(--pdd-muted);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 4px;
}

.pdd-card-excerpt {
	font-size: 13px;
	color: var(--pdd-muted);
	line-height: 1.55;
	margin: 4px 0 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pdd-card-experience {
	font-size: 12px;
	color: #9ca3af;
	margin: 2px 0 0;
}

.pdd-card-email,
.pdd-card-phone {
	font-size: 12px;
	color: var(--pdd-muted);
	margin: 2px 0 0;
}

.pdd-card-email a,
.pdd-card-phone a {
	color: var(--pdd-primary);
	text-decoration: none;
}

.pdd-card-email a:hover,
.pdd-card-phone a:hover {
	text-decoration: underline;
}

/* Card footer */
.pdd-card-footer {
	padding: 10px 16px 14px;
}

.pdd-card-btn {
	display: block;
	text-align: center;
	padding: 9px 16px;
	background: var(--pdd-primary)!important;
	color: #fff!important;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s;
}

.pdd-card-btn:hover,
.pdd-card-btn:focus {
	background: var(--pdd-primary-dk)!important;
	color: #fff;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pdd-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 36px;
	flex-wrap: wrap;
}

.pdd-page-btn {
	padding: 8px 13px;
	border: 1px solid var(--pdd-border);
	border-radius: 6px;
	background: var(--pdd-bg);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	color: var(--pdd-text);
}

.pdd-page-btn:hover {
	background: var(--pdd-bg-hover);
	border-color: var(--pdd-primary);
	color: var(--pdd-primary);
}

.pdd-page-btn.pdd-page-active {
	background: var(--pdd-primary);
	border-color: var(--pdd-primary);
	color: #fff;
	cursor: default;
}

.pdd-page-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.pdd-page-ellipsis {
	padding: 8px 4px;
	font-size: 14px;
	color: var(--pdd-muted);
	user-select: none;
}

/* ==========================================================================
   Single Doctor Profile
   ========================================================================== */
.pdd-single-doctor {
	max-width: 860px;
}

/* Header: photo + identity */
.pdd-single-header {
	display: flex;
	gap: 32px;
	margin-bottom: 36px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.pdd-single-photo {
	flex: 0 0 200px;
}

.pdd-single-photo .pdd-card-photo-placeholder {
	width: 200px;
	height: 200px;
	aspect-ratio: unset;
	border-radius: 12px;
}

.pdd-single-photo .pdd-card-photo-placeholder svg {
	width: 72px;
	height: 72px;
}

.pdd-single-photo-img {
	width: 200px;
	height: 200px!important;
	object-fit: cover;
	object-position: center top;
	border-radius: 12px;
	display: block;
}

.pdd-single-identity {
	flex: 1;
	min-width: 200px;
}

.pdd-single-name {
	font-size: 28px;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 8px;
	color: var(--pdd-text);
}

.pdd-degrees {
	font-size: 18px;
	font-weight: 400;
	color: var(--pdd-muted);
}

.pdd-single-specialties {
	font-size: 16px;
	font-weight: 600;
	color: var(--pdd-primary);
	margin: 6px 0 4px;
}

.pdd-single-locations {
	font-size: 15px;
	color: var(--pdd-muted);
	margin: 4px 0 10px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.pdd-icon-pin {
	flex-shrink: 0;
}

/* Contact buttons */
.pdd-single-contact {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin: 12px 0 8px;
}

.pdd-contact-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--pdd-primary);
	text-decoration: none;
	padding: 7px 14px;
	border: 1.5px solid var(--pdd-primary);
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.pdd-contact-btn:hover,
.pdd-contact-btn:focus {
	background: var(--pdd-primary);
	color: #fff;
}

.pdd-experience {
	font-size: 14px;
	color: var(--pdd-muted);
	margin: 6px 0 0;
}

/* Sections */
.pdd-single-section {
	margin-bottom: 28px;
}

.pdd-single-section h2 {
	font-size: 18px;
	font-weight: 700;
	border-bottom: 2px solid var(--pdd-border);
	padding-bottom: 8px;
	margin: 0 0 14px;
	color: var(--pdd-text);
}

/* Bio */
.pdd-bio-content {
	font-size: 16px;
	line-height: 1.7;
	color: var(--pdd-text);
}

/* Education list */
.pdd-education-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.pdd-education-list li {
	padding: 10px 0;
	border-bottom: 1px solid var(--pdd-border);
	font-size: 15px;
	line-height: 1.5;
}

.pdd-education-list li:last-child {
	border-bottom: none;
}

.pdd-edu-institution {
	color: var(--pdd-muted);
}

.pdd-edu-year {
	font-size: 13px;
	color: #9ca3af;
	margin-left: 4px;
}

/* Video */
.pdd-video-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--pdd-radius);
	overflow: hidden;
}

.pdd-video-wrap iframe {
	width: 100%;
	height: 100%;
	border: none;
	display: block;
}

/* ==========================================================================
   Schedule table (single doctor profile)
   All rules are scoped under .pdd-schedule-section to beat theme table resets
   (zebra stripes, per-column text colours, etc.) without using !important.
   ========================================================================== */
.pdd-schedule-section .pdd-schedule-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

/* Reset theme row/column background colouring */
.pdd-schedule-section .pdd-schedule-table tr {
	background: transparent;
}

/* Both th and td share colour + background reset */
.pdd-schedule-section .pdd-schedule-table th,
.pdd-schedule-section .pdd-schedule-table td {
	color: #1a1a2e;
	background: transparent;
	border-color: #e5e7eb;
}

.pdd-schedule-section .pdd-schedule-table th {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 2px solid #e5e7eb;
	font-weight: 600;
}

.pdd-schedule-section .pdd-schedule-table td {
	padding: 8px 10px;
	vertical-align: middle;
}

.pdd-schedule-empty {
	color: #6b7280;
	font-size: 14px;
	margin: 0;
}

.pdd-slot-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.pdd-slots-available {
	background: #dcfce7;
	color: #166534;
}

.pdd-slots-full {
	background: #fee2e2;
	color: #991b1b;
}

/* Schedule loading state */
.pdd-schedule-loading {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--pdd-muted);
	font-size: 14px;
	padding: 8px 0;
}

/* display:flex on the rule above beats UA [hidden]{display:none}; override it explicitly */
.pdd-schedule-loading[hidden] {
	display: none;
}

/* ==========================================================================
   Availability badge on directory cards
   ========================================================================== */
.pdd-card {
	position: relative;
}

.pdd-availability-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 3px 8px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	pointer-events: none;
	z-index: 1;
	line-height: 1.4;
}

.pdd-available {
	background: #16a34a;
	color: #fff;
}

/* ==========================================================================
   Date filter input
   ========================================================================== */
.pdd-date-filter {
	padding: 8px 10px;
	border: 1px solid var(--pdd-border);
	border-radius: 6px;
	font-size: 14px;
	color: var(--pdd-text);
	background: var(--pdd-bg);
	cursor: pointer;
}

.pdd-date-filter:focus {
	outline: 2px solid var(--pdd-primary);
	outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 680px) {
	.pdd-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.pdd-selects {
		flex: none;
		width: 100%;
		flex-direction: column;
	}

	.pdd-select {
		width: 100%;
	}

	.pdd-grid {
		grid-template-columns: 1fr;
	}

	.pdd-single-header {
		flex-direction: column;
		gap: 20px;
	}

	.pdd-single-photo {
		flex: none;
	}

	.pdd-single-photo-img {
		width: 140px;
		height: 140px;
	}

	.pdd-single-photo .pdd-card-photo-placeholder {
		width: 140px;
		height: 140px;
	}

	.pdd-single-name {
		font-size: 22px;
	}
}
