/**
 * SCC Attendance Manager — Student CSS
 *
 * @package SCC_Attendance_Manager
 */

/* ── STATUS BADGES (shared) ─────────────────────────── */
.scc-status-badge {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	padding: 2px 9px;
	font-size: 12px;
	font-weight: 700;
	text-transform: capitalize;
}

.scc-status-present { color: #27500A; background: #EAF3DE; }
.scc-status-absent  { color: #791F1F; background: #FCEBEB; }
.scc-status-late    { color: #633806; background: #FAEEDA; }

/* ── LESSON ATTENDANCE BAR ──────────────────────────── */
.scc-attendance-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 22px;
	background: #1B2B5B;
	color: #fff;
	box-shadow: 0 8px 20px rgba(27, 43, 91, 0.20);
}

.scc-attendance-bar__info {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.scc-attendance-bar__label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	opacity: 0.65;
}

/* IN / OUT time slots */
.scc-attendance-bar__times {
	display: flex;
	align-items: center;
	gap: 14px;
}

.scc-time-slot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.scc-time-slot strong {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	opacity: 0.55;
}

.scc-time-value {
	font-size: 20px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	opacity: 0.45;
	transition: opacity 0.3s ease, color 0.3s ease;
	min-width: 72px;
	text-align: center;
}

.scc-time-slot.is-done .scc-time-value {
	opacity: 1;
	color: #C9A84C;
}

.scc-time-divider {
	font-size: 18px;
	opacity: 0.35;
	margin-top: 16px;
	user-select: none;
}

/* Action area */
.scc-attendance-bar__actions {
	flex-shrink: 0;
}

.scc-btn-checkin,
.scc-btn-checkout {
	border: 0;
	cursor: pointer;
	font-weight: 700;
	font-size: 14px;
	padding: 11px 24px;
	white-space: nowrap;
	transition: background 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
}

.scc-btn-checkin {
	background: #C9A84C;
	color: #fff;
	box-shadow: 0 4px 12px rgba(201, 168, 76, 0.35);
}

.scc-btn-checkin:hover:not(:disabled) {
	background: #b8943e;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(201, 168, 76, 0.40);
}

.scc-btn-checkout {
	background: #0d1f3a;
	color: #fff;
	box-shadow: 0 4px 12px rgba(39, 80, 10, 0.35);
}

.scc-btn-checkout:hover:not(:disabled) {
	background: #0ba497;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(39, 80, 10, 0.40);
}

.scc-btn-checkin:disabled,
.scc-btn-checkout:disabled {
	opacity: 0.65;
	cursor: wait;
	transform: none;
}

.scc-attendance-complete-badge {
    display: inline-block;
    background: #0d1f3a;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 11px 20px;
}

/* ── DASHBOARD ATTENDANCE TAB ───────────────────────── */
.scc-dashboard-attendance {
	padding: 4px 0;
}

.scc-dash-title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 20px;
	color: #1B2B5B;
}

.scc-no-courses {
	color: #6b7280;
	font-size: 15px;
}

/* Course block */
.scc-course-attendance-block {
	border: 1px solid #d7dce5;
	border-top: 4px solid #0d1f3a;
	border-radius: 10px;
	padding: 20px 22px;
	background: #fff;
	margin-bottom: 24px;
}

.scc-tone--warning { border-top-color: #C9A84C; }
.scc-tone--danger  { border-top-color: #791F1F; }

.scc-course-attendance-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.scc-course-attendance-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1B2B5B;
}

.scc-attendance-pct {
	font-size: 26px;
	font-weight: 800;
	color: #27500A;
	flex-shrink: 0;
}

.scc-tone--warning .scc-attendance-pct { color: #C9A84C; }
.scc-tone--danger  .scc-attendance-pct { color: #791F1F; }

/* Progress bar */
.scc-progress {
	height: 8px;
	border-radius: 999px;
	overflow: hidden;
	background: #edf0f4;
	margin-bottom: 14px;
}

.scc-progress span {
	display: block;
	height: 100%;
	background: #0d1f3a;
	border-radius: 999px;
	transition: width 0.4s ease;
}

.scc-tone--warning .scc-progress span { background: #C9A84C; }
.scc-tone--danger  .scc-progress span { background: #791F1F; }

/* Stats pills */
.scc-attendance-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.scc-stat {
	font-size: 12px;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 999px;
	background: #f3f4f6;
	color: #374151;
}

.scc-stat--present { background: #EAF3DE; color: #27500A; }
.scc-stat--late    { background: #FAEEDA; color: #633806; }
.scc-stat--absent  { background: #FCEBEB; color: #791F1F; }

/* Attendance history table */
.scc-attendance-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.scc-attendance-table th,
.scc-attendance-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #edf0f4;
	text-align: left;
	vertical-align: middle;
}

.scc-attendance-table th {
	font-size: 11px;
	font-weight: 700;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: #f9fafb;
}

.scc-attendance-table tbody tr:last-child td {
	border-bottom: none;
}

.scc-attendance-table tbody tr:hover td {
	background: #f9fafb;
}

/* ── COURSE CATALOG SHORTCODE ───────────────────────── */
.scc-course-catalog {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
}

.scc-course-card {
	display: grid;
	grid-template-columns: 180px minmax(0, 1fr);
	border: 1px solid #d7dce5;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.scc-course-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 160px;
	background: #1B2B5B;
	color: #fff;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}

.scc-course-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.scc-course-card__body {
	padding: 16px;
}

.scc-course-card h3 {
	margin: 0 0 8px;
}

.scc-course-card h3 a {
	color: #1B2B5B;
	text-decoration: none;
}

.scc-course-card__price {
	color: #633806;
	font-weight: 700;
}

.scc-course-card__button {
	display: inline-block;
	margin-top: 12px;
	border: 0;
	border-radius: 8px;
	background: #C9A84C;
	color: #fff;
	cursor: pointer;
	font-weight: 700;
	padding: 10px 16px;
	text-decoration: none;
	white-space: nowrap;
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 680px) {
	.scc-attendance-bar {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.scc-attendance-bar__actions {
		width: 100%;
	}

	.scc-btn-checkin,
	.scc-btn-checkout {
		width: 100%;
		text-align: center;
	}

	.scc-attendance-complete-badge {
		display: block;
		text-align: center;
	}

	.scc-course-catalog {
		grid-template-columns: 1fr;
	}

	.scc-course-card {
		grid-template-columns: 1fr;
	}

	.scc-attendance-table {
		font-size: 12px;
	}

	.scc-attendance-table th,
	.scc-attendance-table td {
		padding: 7px 8px;
	}

	.scc-course-attendance-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.scc-manage-controls,
	.scc-teams-link-row {
		flex-direction: column;
		align-items: stretch;
	}
}

/* ── TEAMS "JOIN CLASS" BLOCK ────────────────────────── */
.scc-teams-join {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 14px;
	padding: 12px 16px;
	border-radius: 10px;
	background: linear-gradient(90deg, #4b53bc 0%, #5a62d6 100%);
	color: #fff;
}

.scc-teams-join__icon {
	font-size: 22px;
	line-height: 1;
}

.scc-teams-join__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
}

.scc-teams-join__text strong {
	font-size: 14px;
	font-weight: 700;
}

.scc-teams-join__text span {
	font-size: 12px;
	opacity: 0.85;
}

.scc-teams-join__btn {
	flex-shrink: 0;
	background: #fff;
	color: #3a41a0;
	font-weight: 700;
	font-size: 13px;
	padding: 9px 18px;
	border-radius: 8px;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.scc-teams-join__btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ── INSTRUCTOR: MANAGE ATTENDANCE PANEL ────────────── */
.scc-manage-attendance {
	border: 1px solid #d7dce5;
	border-top: 4px solid #1B2B5B;
	border-radius: 10px;
	padding: 20px 22px;
	background: #fff;
	margin-bottom: 8px;
}

.scc-section-divider {
	border: 0;
	border-top: 1px solid #e5e9f0;
	margin: 28px 0;
}

.scc-manage-controls,
.scc-teams-link-row {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
}

.scc-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	font-weight: 700;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.scc-field--grow {
	flex: 1 1 320px;
}

.scc-field select,
.scc-field input[type="date"],
.scc-field input[type="url"] {
	font-size: 14px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	padding: 8px 10px;
	border: 1px solid #cbd2de;
	border-radius: 8px;
	color: #1f2937;
	background: #fff;
}

.scc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	border: 0;
	cursor: pointer;
	font-weight: 700;
	font-size: 14px;
	padding: 10px 18px;
	border-radius: 8px;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease, transform 0.12s ease, opacity 0.2s ease;
}

/* Uniform size for the toolbar action buttons (Load Students / Export CSV /
   Save Link / Save Attendance) so they line up evenly. */
.scc-btn--primary,
.scc-btn--ghost {
	min-width: 140px;
	min-height: 42px;
}

.scc-btn--primary {
	background: #0d1f3a;
	color: #fff;
}

.scc-btn--primary:hover:not(:disabled) {
	background: #c9a84c;
	color: #fff;
	transform: translateY(-1px);
}

.scc-btn--ghost {
	background: #eef1f6;
	color: #1B2B5B;
}

.scc-btn--ghost:hover {
	background: #c9a84c;
	color: #fff;
}

.scc-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.scc-help-text {
	font-size: 12px;
	color: #6b7280;
	margin: 0 0 14px;
}

.scc-inline-msg {
	font-size: 13px;
	font-weight: 600;
}

.scc-manage-table input[type="time"],
.scc-manage-table input[type="text"],
.scc-manage-table select {
	width: 100%;
	box-sizing: border-box;
	padding: 6px 8px;
	border: 1px solid #cbd2de;
	border-radius: 6px;
	font-size: 13px;
	color: #1f2937;
	background: #fff;
}

.scc-manage-table .scc-muted {
	font-size: 11px;
	color: #6b7280;
	font-weight: 400;
}

.scc-manage-empty {
	color: #6b7280;
	font-style: italic;
}

.scc-manage-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 16px;
}
