/* OnDemand Tutor — Frontend styles */
:root {
	--otd-primary: #4f46e5;
	--otd-primary-dark: #4338ca;
	--otd-bg: #f8fafc;
	--otd-card: #ffffff;
	--otd-border: #e5e7eb;
	--otd-text: #1f2937;
	--otd-muted: #6b7280;
	--otd-radius: 14px;
	--otd-shadow: 0 1px 3px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.04);
}

.otd-wrap { max-width: 1120px; margin: 0 auto; color: var(--otd-text); font-family: inherit; }
.otd-narrow { max-width: 640px; }
.otd-wrap *, .otd-wrap *::before, .otd-wrap *::after { box-sizing: border-box; }

/* Buttons */
.otd-btn {
	display: inline-block; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--otd-border);
	background: #fff; color: var(--otd-text); font-weight: 600; cursor: pointer; text-decoration: none;
	font-size: 15px; line-height: 1.2; transition: all .15s ease; text-align: center;
}
.otd-btn:hover { transform: translateY(-1px); box-shadow: var(--otd-shadow); }
.otd-btn-primary { background: var(--otd-primary); border-color: var(--otd-primary); color: #fff; }
.otd-btn-primary:hover { background: var(--otd-primary-dark); color:#fff; }
.otd-btn-ghost { background: transparent; }
.otd-btn-lg { width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }

/* Filters */
.otd-filters { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; }
.otd-filters select {
	padding: 10px 14px; border-radius: 10px; border: 1px solid var(--otd-border);
	background: #fff; font-size: 15px; min-width: 160px; color: var(--otd-text);
}

/* Grid + cards */
.otd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.otd-card {
	background: var(--otd-card); border: 1px solid var(--otd-border); border-radius: var(--otd-radius);
	overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.otd-card:hover { box-shadow: var(--otd-shadow); transform: translateY(-2px); }
.otd-card-thumb { position: relative; display: block; aspect-ratio: 16/10; background: #eef2ff; overflow: hidden; }
.otd-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.otd-thumb-ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 52px; background: linear-gradient(135deg,#eef2ff,#e0e7ff); }
.otd-badge {
	position: absolute; top: 10px; left: 10px; padding: 4px 12px; border-radius: 20px;
	font-size: 12px; font-weight: 700; color: #fff; background: var(--otd-primary);
}
.otd-badge-live { background: #dc2626; }
.otd-badge-ondemand { background: #059669; }
.otd-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.otd-card-title { font-size: 17px; margin: 0; line-height: 1.4; }
.otd-card-title a { color: var(--otd-text); text-decoration: none; }
.otd-card-title a:hover { color: var(--otd-primary); }
.otd-card-tutor, .otd-card-excerpt { margin: 0; color: var(--otd-muted); font-size: 14px; }
.otd-card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; }
.otd-price { font-size: 18px; font-weight: 800; color: var(--otd-primary); white-space: nowrap; }

/* Tutor cards */
.otd-grid-tutors .otd-card { text-align: center; }
.otd-tutor-avatar { padding: 20px 20px 0; }
.otd-tutor-avatar img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto; display: block; }
.otd-tutor-avatar .otd-thumb-ph { width: 110px; height: 110px; border-radius: 50%; margin: 0 auto; font-size: 44px; }
.otd-tutor-meta { font-size: 14px; color: var(--otd-muted); margin: 2px 0; }
.otd-tutor-terms { font-size: 13px; margin: 6px 0; }
.otd-tutor-terms a { color: var(--otd-primary); text-decoration: none; }
.otd-tutor-bio { font-size: 14px; color: var(--otd-muted); text-align: left; }

/* Forms */
.otd-form { display: flex; flex-direction: column; gap: 6px; background: var(--otd-card); padding: 24px; border: 1px solid var(--otd-border); border-radius: var(--otd-radius); }
.otd-form label { font-weight: 600; font-size: 14px; margin-top: 10px; }
.otd-form input, .otd-form select, .otd-form textarea {
	padding: 12px 14px; border: 1px solid var(--otd-border); border-radius: 10px; font-size: 15px;
	font-family: inherit; width: 100%; color: var(--otd-text); background:#fff;
}
.otd-form input:focus, .otd-form select:focus, .otd-form textarea:focus {
	outline: none; border-color: var(--otd-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.otd-req { color: #dc2626; }

/* Course detail */
.otd-course-detail { background: var(--otd-card); border: 1px solid var(--otd-border); border-radius: var(--otd-radius); padding: 24px; margin-bottom: 20px; }
.otd-course-detail-img img { width: 100%; border-radius: 10px; margin-bottom: 16px; }
.otd-course-detail-meta { color: var(--otd-muted); font-size: 15px; }

/* Auth tabs */
.otd-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.otd-tab { flex: 1; padding: 12px; border: 1px solid var(--otd-border); background: #fff; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 15px; color: var(--otd-muted); }
.otd-tab.active { background: var(--otd-primary); color: #fff; border-color: var(--otd-primary); }
.otd-forgot { text-align: center; margin: 12px 0 0; font-size: 14px; }

/* Dashboard */
.otd-dash-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.otd-dash-header h2 { margin: 0; }
.otd-dash-list { display: flex; flex-direction: column; gap: 18px; }
.otd-dash-item { background: var(--otd-card); border: 1px solid var(--otd-border); border-radius: var(--otd-radius); padding: 20px; }
.otd-dash-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.otd-dash-item-head h3 { margin: 0; font-size: 18px; }
.otd-status-pill { color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.otd-dash-item-meta { color: var(--otd-muted); font-size: 14px; margin: 8px 0 14px; }
.otd-lesson { margin-top: 16px; }
.otd-lesson h4 { margin: 0 0 10px; }

/* Video responsive */
.otd-video-wrap { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.otd-video-wrap iframe, .otd-video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Payment */
.otd-payment-box { background: var(--otd-card); border: 2px solid var(--otd-primary); border-radius: var(--otd-radius); padding: 24px; margin-bottom: 24px; }
.otd-pay-amount { font-size: 18px; }
.otd-pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 20px; margin: 16px 0; }
.otd-pay-method { border: 1px solid var(--otd-border); border-radius: 12px; padding: 18px; text-align: center; }
.otd-qr { display: flex; justify-content: center; padding: 10px; }
.otd-qr canvas, .otd-qr img { max-width: 200px; height: auto; }
.otd-bank-number { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: var(--otd-primary); }
.otd-pay-note { color: var(--otd-muted); font-size: 14px; margin: 4px 0; }
.otd-slip-upload { border-top: 1px solid var(--otd-border); padding-top: 18px; margin-top: 8px; }
.otd-slip-upload input[type=file] { margin: 10px 0; }

/* Notices */
.otd-notice { padding: 14px 18px; border-radius: 10px; margin: 0 0 16px; font-size: 15px; border: 1px solid transparent; }
.otd-notice a { color: inherit; font-weight: 700; }
.otd-notice-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.otd-notice-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.otd-notice-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* Pagination */
.otd-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.otd-pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--otd-border); border-radius: 8px; text-decoration: none; color: var(--otd-text); }
.otd-pagination .current { background: var(--otd-primary); color: #fff; border-color: var(--otd-primary); }

@media (max-width: 600px) {
	.otd-dash-header { flex-direction: column; align-items: flex-start; }
}
