/**
 * Transcriptions Sync - Frontend Styles
 *
 * @package TranscriptionsSync
 */

/* ===================================
   List View Styles - Desktop
   =================================== */

.transcriptions-list-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
	font-family: 'Poppins', sans-serif;
}

/* Desktop Table View (768px and up) */
.transcriptions-table-view {
	display: block;
}

.transcriptions-mobile-view {
	display: none;
}

/* Header Row */
.transcriptions-header {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 0;
	margin-bottom: 40px;
	border-bottom: 1px solid #ddd;
}

.transcriptions-header-col {
	padding: 0;
}

/* Header Filter Buttons */
.header-filter-btn {
	width: 100%;
	padding: 12px 0;
	background: #F5F5F5;
	border: none;
	border-bottom: 3px solid transparent;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	color: #333;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.2s ease;
	letter-spacing: 0.5px;
}

.header-filter-btn:hover {
	background: #EBEBEB;
}

.header-filter-btn.active {
	border-bottom-color: #000000;
	background: #EBEBEB;
	font-weight: 700;
}

/* Content Area */
.transcriptions-content {
	display: block;
}

/* Maqam Sections */
.transcriptions-maqam-section {
	margin-bottom: 35px;
}

.transcriptions-maqam-name {
	font-size: 16px;
	font-weight: 600;
	color: #333;
	margin: 0 0 12px 0;
	padding: 0;
	line-height: 1.4;
	letter-spacing: normal;
}

/* Transcription Entries */
.transcriptions-entries {
	display: block;
}

.transcription-entry {
	margin-bottom: 8px;
	line-height: 1.7;
}

.transcription-link {
	font-size: 15px;
	font-weight: 300;
	color: #353535;
	text-decoration: none;
	transition: color 0.2s ease;
	display: inline-block;
}

.transcription-link:hover,
.transcription-link:active {
	color: #000000;
	text-decoration: none;
}

/* ===================================
   List View Styles - Mobile
   =================================== */

@media screen and (max-width: 767px) {
	.transcriptions-list-container {
		padding: 20px 15px;
	}

	/* Hide desktop view */
	.transcriptions-table-view {
		display: none;
	}

	/* Show mobile view */
	.transcriptions-mobile-view {
		display: block;
	}

	/* Mobile Header with Dropdown */
	.mobile-filter-header {
		margin-bottom: 30px;
	}

	/* Mobile Filter Toggle Button */
	.mobile-filter-toggle {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 14px 16px;
		background: #F9F9F9;
		border: 1px solid #E0E0E0;
		border-radius: 4px;
		cursor: pointer;
		font-family: inherit;
		transition: background-color 0.2s ease;
	}

	.mobile-filter-toggle:hover {
		background: #F5F5F5;
	}

	.filter-label {
		font-size: 16px;
		font-weight: 600;
		color: #333;
		letter-spacing: 0.3px;
	}

	.toggle-icon {
		font-size: 20px;
		font-weight: 300;
		color: #666;
		line-height: 1;
	}

	/* Mobile Filter Dropdown */
	.mobile-filter-dropdown {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
		background: white;
	}

	.mobile-filter-dropdown.active {
		max-height: 200px;
	}

	.filter-option {
		padding: 14px 16px;
		font-size: 15px;
		font-weight: 400;
		color: #333;
		border-top: 1px solid #E0E0E0;
		background: white;
		cursor: pointer;
		transition: background-color 0.2s ease;
		min-height: 44px;
		display: flex;
		align-items: center;
	}

	.filter-option:hover {
		background: #F5F5F5;
	}

	/* Mobile Content */
	.transcriptions-mobile-content {
		display: block;
	}

	.transcriptions-mobile-content .transcriptions-maqam-section {
		margin-bottom: 24px;
	}

	.transcriptions-mobile-content .transcriptions-maqam-section:first-child .transcriptions-maqam-name {
		margin-top: 0;
	}

	.transcriptions-mobile-content .transcriptions-maqam-name {
		font-size: 16px;
		font-weight: 600;
		color: #333;
		margin: 24px 0 12px 0;
		letter-spacing: normal;
	}

	.transcriptions-mobile-content .transcription-entry {
		margin-bottom: 8px;
		line-height: 1.4;
	}

	.transcriptions-mobile-content .transcription-link {
		font-size: 15px;
		font-weight: 300;
		color: #999;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		padding: 8px 0;
		transition: color 0.2s ease;
	}

	.transcriptions-mobile-content .transcription-link:hover,
	.transcriptions-mobile-content .transcription-link:active {
		color: #000000;
	}
}

/* ===================================
   Single Transcription Styles
   =================================== */

.transcription-single-container {
	max-width: 900px;
	margin: 0 auto;
	padding: 40px 20px;
}

.transcription-title {
	font-size: 36px;
	font-weight: 400;
	color: #333;
	margin: 0 0 16px 0;
	line-height: 1.2;
	text-align: center;
}

.transcription-composer {
	font-size: 22px;
	font-weight: 300;
	color: #666;
	margin: 0 0 32px 0;
	line-height: 1.3;
	text-align: center;
}

/* About Section - No heading, centered, thin font */
.transcription-about {
	text-align: center;
	font-weight: 300;
	font-size: 16px;
	color: #353535;
	line-height: 1.6;
	margin: 32px auto;
	max-width: 800px;
	padding: 0 20px;
}

.transcription-about p {
	margin: 0 0 16px 0;
}

.transcription-about p:last-child {
	margin-bottom: 0;
}

.transcription-section {
	margin-bottom: 32px;
}

.transcription-section:first-of-type {
	margin-top: 48px;
}

.transcription-section-heading {
	font-size: 18px;
	font-weight: 400;
	color: #333;
	margin: 0 0 8px 0;
	padding: 0;
	border: none;
	text-align: left;
	letter-spacing: 0.5px;
}

.section-separator {
	height: 2px;
	background-color: #999;
	margin: 0 0 16px 0;
	border: none;
}

.section-separator.iqa {
	background-color: #999;
}

.section-value {
	font-size: 16px;
	font-weight: 300;
	color: #353535;
	margin: 0 0 24px 0;
	line-height: 1.6;
}

/* Text Section - Centered, supports Arabic/RTL */
.section-text-content {
	text-align: center;
	font-weight: 300;
	font-size: 16px;
	color: #353535;
	line-height: 1.8;
	margin: 24px auto;
	max-width: 800px;
	padding: 0 20px;
	direction: auto;
	unicode-bidi: plaintext;
}

.section-text-content p {
	margin: 0 0 16px 0;
}

.section-text-content p:last-child {
	margin-bottom: 0;
}

/* Translation Section - Left-aligned paragraphs */
.section-translation-content {
	text-align: left;
	font-weight: 300;
	font-size: 16px;
	color: #353535;
	line-height: 1.6;
	margin: 24px 0;
	white-space: pre-wrap;
}

.section-translation-content p {
	margin: 0 0 16px 0;
}

.section-translation-content p:last-child {
	margin-bottom: 0;
}

/* Analysis Section - Left-aligned paragraphs */
.section-analysis-content {
	text-align: left;
	font-weight: 300;
	font-size: 16px;
	color: #353535;
	line-height: 1.6;
	margin: 24px 0;
	white-space: pre-wrap;
}

.section-analysis-content p {
	margin: 0 0 16px 0;
}

.section-analysis-content p:last-child {
	margin-bottom: 0;
}

.transcription-section-content {
	font-size: 18px;
	color: #495057;
	line-height: 1.6;
	margin: 15px 0;
}

/* PDF Section */
.transcription-pdf-section {
	margin-top: 50px;
}

.transcription-pdf-viewer {
	width: 100%;
	margin-top: 20px;
}

/* PDF Controls */
.pdf-controls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	padding: 20px;
	margin-top: 15px;
}

.pdf-nav-btn {
	min-height: 44px;
	min-width: 140px;
	padding: 10px 20px;
	background: transparent;
	color: #333;
	border: 1px solid #999;
	border-radius: 0;
	font-weight: 300;
	font-size: 16px;
	cursor: pointer;
	transition: opacity 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.pdf-nav-btn:hover:not(:disabled) {
	opacity: 0.7;
}

.pdf-nav-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

/* PDF Canvas */
.pdf-canvas-wrapper {
	position: relative;
	width: 100%;
	background-color: #f5f5f5;
	border: 1px solid #dee2e6;
	border-top: none;
	min-height: 400px;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: pan-y;
}

#pdf-canvas {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

.pdf-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 18px;
	color: #666;
	font-weight: 600;
}

/* Download Section */
.pdf-download-section {
	text-align: center;
	padding: 20px;
	background: none;
	border: none;
	margin-top: 16px;
}

.pdf-download-btn {
	display: inline-block;
	padding: 0;
	background: none;
	color: #353535;
	text-decoration: none;
	border: none;
	font-weight: 300;
	font-size: 16px;
	transition: all 0.2s ease;
	cursor: pointer;
}

.pdf-download-btn:hover {
	color: #666;
	text-decoration: underline;
}

.pdf-download-btn .dashicons {
	display: none;
}

/* ===================================
   Mobile Responsive - Single Page
   =================================== */

@media screen and (max-width: 768px) {
	.transcription-single-container {
		padding: 20px 15px;
	}

	.transcription-title {
		font-size: 28px;
		margin-bottom: 12px;
	}

	.transcription-composer {
		font-size: 20px;
		margin-bottom: 32px;
	}

	.transcription-section:first-of-type {
		margin-top: 32px;
	}

	.transcription-section-heading {
		font-size: 16px;
	}

	.section-value {
		font-size: 15px;
	}

	.pdf-controls {
		padding: 15px;
		gap: 15px;
	}

	.pdf-nav-btn {
		min-width: 130px;
		padding: 14px 20px;
		font-size: 15px;
	}

	.pdf-download-btn {
		font-size: 16px;
		padding: 0;
	}

	/* About section responsive */
	.transcription-about {
		font-size: 15px;
		margin: 24px auto;
		padding: 0 15px;
	}

	/* Text section responsive */
	.section-text-content {
		font-size: 15px;
		margin: 20px auto;
		padding: 0 15px;
	}

	/* Translation section responsive */
	.section-translation-content {
		font-size: 15px;
		margin: 20px 0;
	}

	/* Analysis section responsive */
	.section-analysis-content {
		font-size: 15px;
		margin: 20px 0;
	}
}

@media screen and (max-width: 480px) {
	.transcription-single-container {
		padding: 15px;
	}

	.transcription-title {
		font-size: 24px;
		margin-bottom: 10px;
	}

	.transcription-composer {
		font-size: 18px;
		margin-bottom: 28px;
	}

	.transcription-section:first-of-type {
		margin-top: 24px;
	}

	.transcription-section-heading {
		font-size: 15px;
	}

	.section-value {
		font-size: 14px;
	}

	.pdf-controls {
		padding: 12px;
		gap: 12px;
	}

	.pdf-nav-btn {
		min-width: 110px;
		padding: 12px 16px;
		font-size: 14px;
	}

	/* About section responsive - small mobile */
	.transcription-about {
		font-size: 14px;
		margin: 20px auto;
		padding: 0 10px;
	}

	/* Text section responsive - small mobile */
	.section-text-content {
		font-size: 14px;
		margin: 16px auto;
		padding: 0 10px;
		line-height: 1.7;
	}

	/* Translation section responsive - small mobile */
	.section-translation-content {
		font-size: 14px;
		margin: 16px 0;
	}

	/* Analysis section responsive - small mobile */
	.section-analysis-content {
		font-size: 14px;
		margin: 16px 0;
	}
}

/* ===================================
   Print Styles
   =================================== */

@media print {
	.transcription-pdf-embed {
		border: none;
		box-shadow: none;
	}

	.transcription-pdf-fallback {
		display: none;
	}
}
