/**
 * ScholaBook Public Styles
 *
 * Minimal, theme-agnostic styles that work with any WordPress theme.
 * Uses BEM naming: .sb-{block}__{element}--{modifier}
 */

/* Base container */
.sb-container {
	max-width: 720px;
	margin: 0 auto;
	padding: 20px 0;
	font-family: inherit;
}

/* Branding */
.sb-powered-by {
	text-align: center;
	font-size: 0.75em;
	color: #888;
	margin-top: 20px;
	padding-top: 10px;
	border-top: 1px solid #eee;
}
.sb-powered-by a {
	color: #0073aa;
	text-decoration: none;
}

/* Cards */
.sb-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.sb-card__title {
	margin: 0 0 15px;
	font-size: 1.25em;
	font-weight: 600;
}

/* Forms */
.sb-form__group {
	margin-bottom: 12px;
}
.sb-form__label {
	display: block;
	margin-bottom: 4px;
	font-weight: 500;
	font-size: 13px;
}
.sb-form__input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	box-sizing: border-box;
}
.sb-form__input:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}
.sb-form__btn {
	display: inline-block;
	padding: 10px 24px;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 1em;
	cursor: pointer;
	transition: background 0.2s;
}
.sb-form__btn:hover {
	background: #005a87;
}
.sb-form__btn:disabled {
	background: #999;
	cursor: not-allowed;
}
.sb-form__btn--secondary {
	background: #666;
}

/* Login method tabs */
.sb-login-method-tabs {
	display: flex;
	margin-bottom: 16px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	background: #f8fafc;
	padding: 3px;
	gap: 3px;
}
.sb-login-method-tab {
	flex: 1;
	padding: 9px 12px !important;
	border: none !important;
	border-radius: 8px !important;
	background: transparent !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	color: #64748b !important;
	cursor: pointer;
	transition: all 0.2s;
	text-align: center;
	line-height: 1.4;
	outline: none !important;
	box-shadow: none !important;
	margin: 0 !important;
}
.sb-login-method-tab--active {
	background: #fff !important;
	color: #3699ff !important;
	box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
	font-weight: 600 !important;
}
.sb-login-method-tab:hover:not(.sb-login-method-tab--active) {
	color: #475569 !important;
	background: rgba(0,0,0,0.03) !important;
}

/* Alerts */
.sb-alert {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 15px;
}
.sb-alert--success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}
.sb-alert--error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}
.sb-alert--info {
	background: #d1ecf1;
	color: #0c5460;
	border: 1px solid #bee5eb;
}

/* Tables */
.sb-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 15px;
}
.sb-table th,
.sb-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #eee;
}
.sb-table th {
	font-weight: 600;
	background: #f9f9f9;
}
.sb-table tr:last-child td {
	border-bottom: none;
}

/* Loading spinner */
.sb-loading {
	text-align: center;
	padding: 20px;
	color: #666;
}
.sb-loading::after {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #ccc;
	border-top-color: #0073aa;
	border-radius: 50%;
	animation: sb-spin 0.6s linear infinite;
	margin-left: 8px;
	vertical-align: middle;
}
@keyframes sb-spin {
	to { transform: rotate(360deg); }
}

/* Login required notice */
.sb-login-required {
	text-align: center;
	padding: 30px 20px;
}

/* School info widget */
.sb-school-info {
	text-align: center;
}
.sb-school-info__logo {
	max-width: 120px;
	height: auto;
	margin-bottom: 10px;
}
.sb-school-info__name {
	font-size: 1.3em;
	font-weight: 700;
	margin: 5px 0;
}
.sb-school-info__tagline {
	color: #666;
	font-style: italic;
}

/* Fee summary badges */
.sb-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 0.8em;
	font-weight: 500;
}
.sb-badge--paid {
	background: #d4edda;
	color: #155724;
}
.sb-badge--unpaid {
	background: #f8d7da;
	color: #721c24;
}
.sb-badge--partial {
	background: #fff3cd;
	color: #856404;
}

/* Holidays */
.sb-holidays__item {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
}
.sb-holidays__date {
	font-weight: 500;
	white-space: nowrap;
}

/* Notices */
.sb-notice {
	padding: 15px;
	border-left: 4px solid #0073aa;
	margin-bottom: 15px;
	background: #f9f9f9;
}
.sb-notice--urgent {
	border-left-color: #dc3545;
}
.sb-notice__title {
	font-weight: 600;
	margin-bottom: 5px;
}
.sb-notice__date {
	font-size: 0.8em;
	color: #888;
}

/* OTP form */
.sb-otp-form__timer {
	font-size: 0.85em;
	color: #666;
	margin-top: 5px;
}

/* Student selector */
.sb-student-select {
	margin-bottom: 15px;
}
.sb-student-select select {
	width: 100%;
	padding: 8px;
	border-radius: 4px;
	border: 1px solid #ccc;
}
