/**
 * Stylesheet Frontend: Panel AI Summary, Flashcard, dan RAG Chat di Lesson Tutor LMS
 */

.tas-frontend-wrapper {
	margin: 28px 0;
	font-family: inherit;
	color: #0f172a;
}

/* Kartu Terkunci */
.tas-locked-card {
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 20px 24px;
}

.tas-locked-header {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 16px;
}

.tas-lock-icon {
	font-size: 24px;
	line-height: 1.2;
}

.tas-locked-title {
	margin: 0 0 6px 0;
	font-size: 17px;
	font-weight: 600;
	color: #0f172a;
}

.tas-locked-subtitle {
	margin: 0 0 12px 0;
	font-size: 14px;
	color: #475569;
	line-height: 1.55;
}

.tas-locked-benefits {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin-top: 8px;
}

.tas-benefit-item {
	font-size: 13px;
	font-weight: 600;
	color: #1e40af;
}

.tas-progress-bar-track {
	width: 100%;
	height: 8px;
	background: #e2e8f0;
	border-radius: 4px;
	overflow: hidden;
}

.tas-progress-bar-fill {
	height: 100%;
	background: #2563eb;
	transition: width 0.25s ease;
}

.tas-locked-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
}

.tas-locked-hint {
	font-size: 13px;
	color: #64748b;
}

.tas-skip-notice {
	margin-top: 12px;
	font-size: 13px;
	color: #b45309;
}

/* Panel Utama Summary */
.tas-summary-panel {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 24px;
}

.tas-summary-topbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f1f5f9;
}

.tas-summary-heading {
	margin: 0 0 4px 0;
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
}

.tas-summary-meta {
	margin: 0;
	font-size: 13px;
	color: #64748b;
}

/* Navigasi Tab */
.tas-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	background: #f1f5f9;
	padding: 4px;
	border-radius: 8px;
	margin-bottom: 20px;
}

.tas-tab-btn {
	background: transparent;
	border: none;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tas-tab-btn:hover {
	color: #0f172a;
}

.tas-tab-btn.is-active {
	background: #ffffff;
	color: #0f172a;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.tas-tab-pane {
	display: none;
}

.tas-tab-pane.is-active {
	display: block;
}

/* TL;DR & Deep Dive */
.tas-tldr-box,
.tas-deepdive-box,
.tas-examples-box {
	margin-bottom: 20px;
}

.tas-tldr-box h4,
.tas-deepdive-box h4,
.tas-examples-box h4 {
	margin: 0 0 8px 0;
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
}

.tas-tldr-box p,
.tas-deepdive-box p {
	margin: 0;
	font-size: 15px;
	line-height: 1.65;
	color: #334155;
}

/* Key Points & Timestamp Button */
.tas-keypoints-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tas-keypoint-item {
	padding-bottom: 14px;
	border-bottom: 1px solid #f1f5f9;
}

.tas-keypoint-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 4px;
}

.tas-timestamp-link {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
	border-radius: 4px;
	padding: 2px 8px;
	font-size: 12px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}

.tas-timestamp-link:hover {
	background: #dbeafe;
}

.tas-keypoint-detail {
	margin: 0;
	font-size: 14px;
	color: #475569;
	line-height: 1.55;
}

/* Outline Collapsible */
.tas-outline-section {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	margin-bottom: 10px;
	padding: 12px 16px;
}

.tas-outline-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
}

.tas-outline-time {
	font-size: 12px;
	color: #64748b;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-variant-numeric: tabular-nums;
}

.tas-outline-content {
	margin-top: 10px;
	font-size: 14px;
	color: #334155;
}

/* Glossary */
.tas-glossary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}

.tas-glossary-item {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 14px 16px;
}

.tas-glossary-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.tas-glossary-def {
	margin: 0;
	font-size: 14px;
	color: #475569;
	line-height: 1.5;
}

/* Flashcards Modern */
.tas-frontend-wrapper,
.tas-frontend-wrapper *:not(#tas-chat-input) {
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
	user-select: none !important;
}

#tas-chat-input {
	-webkit-user-select: text !important;
	-moz-user-select: text !important;
	-ms-user-select: text !important;
	user-select: text !important;
}

.tas-flashcard-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	flex-wrap: wrap;
	gap: 10px;
}

.tas-fc-counter-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 5px 12px;
	border-radius: 8px;
	font-size: 13px;
	color: #475569;
}

.tas-fc-filter {
	display: flex;
	gap: 6px;
}

.tas-fc-mode-btn {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
}

.tas-fc-mode-btn.is-active {
	background: #0f172a;
	color: #ffffff;
	border-color: #0f172a;
}

.tas-flashcard-stage {
	margin-bottom: 18px;
}

.tas-flashcard-card {
	display: none;
	border: none;
	padding: 0;
	background: transparent;
}

.tas-flashcard-card.is-current {
	display: block;
}

.tas-flashcard-surface {
	border-radius: 14px;
	padding: 26px 28px;
	min-height: 220px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	cursor: pointer;
}

.tas-flashcard-front {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	border: 1.5px solid #cbd5e1;
}

.tas-flashcard-back {
	display: none;
	background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
	border: 1.5px solid #86efac;
}

.tas-flashcard-card.is-flipped .tas-flashcard-front {
	display: none !important;
}

.tas-flashcard-card.is-flipped .tas-flashcard-back {
	display: flex !important;
}

.tas-flashcard-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.tas-btn-flip {
	background: #2563eb;
	color: #ffffff;
	border: 1px solid #1d4ed8;
	border-radius: 8px;
	padding: 9px 20px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.tas-btn-primary {
	background: #0f172a;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	padding: 9px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.tas-btn-secondary {
	background: #ffffff;
	color: #0f172a;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 9px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}


.tas-chat-messages {
	max-height: 360px;
	overflow-y: auto;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 14px;
	background: #f8fafc;
}

.tas-chat-turn {
	margin-bottom: 14px;
}

.tas-chat-bubble {
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.55;
	margin-bottom: 8px;
}

.tas-chat-user {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e3a8a;
}

.tas-chat-assistant {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	color: #0f172a;
}

.tas-chat-form textarea {
	width: 100%;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 14px;
	resize: vertical;
	margin-bottom: 8px;
}

.tas-chat-form-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.tas-chat-quota {
	font-size: 12px;
	color: #64748b;
}

/* Transkrip Video & Materi */
.tas-transcript-box h4 {
	margin: 0 0 12px 0;
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
}

.tas-transcript-lines {
	max-height: 400px;
	overflow-y: auto;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 16px;
	background: #f8fafc;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tas-transcript-line {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.6;
	color: #334155;
}

.tas-transcript-paragraph {
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
	color: #334155;
}

