/* Bilal Academy Management — front-end styles
   Namespaced with .bam- so it will not clash with the active theme or with
   Elementor / ElementsKit / Essential Addons styles already on the page. */

.bam-wrap { max-width: 900px; margin: 0 auto; font-size: 15px; line-height: 1.6; color: #222; }
.bam-heading { font-size: 26px; margin-bottom: 4px; }
.bam-subheading { font-size: 19px; margin: 28px 0 10px; border-bottom: 2px solid #e5e5e5; padding-bottom: 6px; }
.bam-lead { color: #555; margin-top: 0; }
.bam-note { font-size: 13px; color: #666; }
.bam-empty { color: #777; font-style: italic; }

.bam-notice { padding: 12px 16px; border-radius: 4px; margin: 14px 0; font-size: 14px; }
.bam-notice--success { background: #eafaf0; border: 1px solid #a6e3bf; color: #146c34; }
.bam-notice--error { background: #fdecec; border: 1px solid #f3b3b3; color: #a3282f; }
.bam-notice--warning { background: #fff8e6; border: 1px solid #f1d78a; color: #7a5c00; }

/* ---- forms ---- */
.bam-form label, .bam-inline-form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 14px; }
.bam-form input[type=text], .bam-form input[type=email], .bam-form input[type=tel],
.bam-form input[type=date], .bam-form input[type=number], .bam-form select, .bam-form textarea {
	display: block; width: 100%; margin-top: 5px; padding: 9px 11px; font-size: 14px;
	border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-weight: normal;
}
.bam-fieldset { border: 1px solid #e2e2e2; border-radius: 6px; padding: 20px; margin-bottom: 22px; }
.bam-fieldset legend { font-weight: 700; font-size: 15px; padding: 0 8px; }
.bam-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.bam-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.bam-grid-4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0 16px; }
.bam-span-2 { grid-column: span 2; }
.bam-span-3 { grid-column: span 3; }
@media (max-width: 640px) {
	.bam-grid-2, .bam-grid-3, .bam-grid-4 { grid-template-columns: 1fr; }
	.bam-span-2, .bam-span-3 { grid-column: span 1; }
}
.bam-check { display: flex; align-items: flex-start; gap: 8px; font-weight: normal; }
.bam-check input { margin-top: 3px; }
.req { color: #c0392b; }
.bam-hp { position: absolute; left: -9999px; }
.bam-fees { display: flex; gap: 24px; background: #f7f7f7; padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.bam-fees div { display: flex; flex-direction: column; font-size: 13px; }
.bam-terms { max-height: 180px; overflow: auto; border: 1px solid #eee; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }

.bam-btn { display: inline-block; padding: 11px 22px; border-radius: 5px; border: 0; font-size: 14px;
	font-weight: 600; cursor: pointer; text-decoration: none; background: #2c3e50; color: #fff; }
.bam-btn--primary { background: #146c43; }
.bam-btn--small { padding: 7px 14px; font-size: 13px; }
.bam-btn:hover { opacity: .9; color: #fff; }

/* ---- tables ---- */
.bam-table { width: 100%; border-collapse: collapse; margin: 10px 0 24px; font-size: 14px; }
.bam-table th, .bam-table td { border-bottom: 1px solid #eaeaea; padding: 9px 10px; text-align: left; vertical-align: middle; }
.bam-table th { background: #fafafa; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #555; }
.bam-table td.num, .bam-table th.num { text-align: right; }
.bam-nowrap { white-space: nowrap; }
.bam-due { color: #b91c1c; }
.bam-paid { color: #147a3f; font-weight: 600; }
.bam-ref { font-family: monospace; font-size: 12px; }

.bam-badge { display: inline-block; padding: 3px 9px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.bam-badge--present { background: #e6f6ea; color: #147a3f; }
.bam-badge--late { background: #fff3d6; color: #92650a; }
.bam-badge--absent { background: #fde8e8; color: #a3282f; }
.bam-badge--excused { background: #e8eefc; color: #29499b; }

.bam-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

/* ---- stats ---- */
.bam-stat-row { display: flex; gap: 16px; margin: 16px 0 26px; flex-wrap: wrap; }
.bam-stat { background: #f7f7f7; border-radius: 8px; padding: 16px 20px; min-width: 160px; }
.bam-stat__label { display: block; font-size: 12px; text-transform: uppercase; color: #777; letter-spacing: .4px; }
.bam-stat__value { display: block; font-size: 24px; font-weight: 700; margin-top: 4px; }

/* ---- portal ---- */
.bam-portal__title { margin-bottom: 4px; }
.bam-portal__lead { color: #666; }
.bam-portal__help { margin-top: 14px; font-size: 13px; }
.bam-portal--login form p { margin-bottom: 12px; }
.bam-portal--login input[type=text], .bam-portal--login input[type=password] {
	display: block; width: 100%; max-width: 320px; padding: 9px 11px; margin-top: 4px; border: 1px solid #ccc; border-radius: 4px;
}
.bam-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e5e5e5; margin: 16px 0; flex-wrap: wrap; }
.bam-tab { padding: 9px 16px; text-decoration: none; color: #444; font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.bam-tab.is-active { border-bottom-color: #146c43; color: #146c43; }
.bam-class-picker { margin: 12px 0; }
.bam-class-picker select { padding: 6px 10px; }
.bam-portal__actions { margin: 14px 0; }

/* attendance / gradebook mini forms */
.bam-inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 14px 0; }
.bam-inline-form label { display: flex; flex-direction: column; font-size: 12px; font-weight: 600; gap: 4px; }
.bam-input--tiny { width: 70px !important; }
.bam-input--wide { width: 220px !important; }
.bam-radio-cell { text-align: center; }
.bam-due-badge { font-size: 11px; background: #fff3d6; color: #92650a; padding: 2px 8px; border-radius: 10px; margin-left: 8px; }
.bam-homework-block { border: 1px solid #eee; border-radius: 6px; padding: 14px 16px; margin-bottom: 16px; }

/* signature pad */
.bam-signature-pad { border: 1px dashed #999; background: #fff; touch-action: none; display: block; margin: 10px 0; }
.bam-signin__status { background: #f7f7f7; border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; }
.bam-signin__actions { margin-top: 14px; }

/* ---- calendar ---- */
.bam-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 20px; font-size: 12px; }
.bam-legend__item { display: flex; align-items: center; gap: 6px; }
.bam-legend__item i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.bam-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
@media (max-width: 900px) { .bam-months { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .bam-months { grid-template-columns: 1fr; } }
.bam-month { border: 1px solid #eee; border-radius: 6px; overflow: hidden; }
.bam-month__title { background: #2c3e50; color: #fff; text-align: center; padding: 8px; font-weight: 700; font-size: 13px; }
.bam-month__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.bam-month__dow { text-align: center; font-size: 10px; color: #999; padding: 4px 0; }
.bam-month__day { min-height: 56px; border-top: 1px solid #f2f2f2; padding: 3px; font-size: 11px; position: relative; }
.bam-month__day--pad { background: #fafafa; }
.bam-month__num { font-size: 11px; color: #888; }
.bam-month__day.is-today .bam-month__num { background: #146c43; color: #fff; border-radius: 50%; padding: 1px 5px; }
.bam-month__day.is-schoolday { background: #f5fbf8; }
.bam-chip { display: block; color: #fff; font-size: 9px; padding: 1px 4px; border-radius: 3px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* PayPal buttons render into this slot */
.bam-paypal-slot { display: inline-block; min-width: 160px; }
.bam-pay { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- registration: siblings & second guardian ---- */
.bam-sibling-block { border: 1px dashed #ccc; border-radius: 6px; padding: 16px; margin-bottom: 14px; background: #fafafa; }
.bam-sibling-block__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bam-remove-sibling { background: none; border: 1px solid #c0392b; color: #c0392b; border-radius: 4px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.bam-second-guardian { border: 1px solid #e2e2e2; border-radius: 6px; padding: 16px; margin: 10px 0 16px; background: #fbfbfb; }
.bam-sms-optin { border: 1px solid #e2e2e2; border-radius: 6px; padding: 14px 18px; background: #fbfbfb; font-size: 13px; }
.bam-sms-optin p { margin: 0 0 10px; }
.bam-sms-optin .bam-check { margin-top: 8px; }
.bam-fee-table td, .bam-fee-table th { text-align: left; }
.bam-fee-table td.num, .bam-fee-table th.num { text-align: right; }
.bam-payment-black, .bam-payment-black * { color: #000 !important; }
.bam-payment-black input, .bam-payment-black select, .bam-payment-black textarea { color: #000 !important; }
.bam-tuition-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 6px; }
@media (max-width: 640px) { .bam-tuition-options { grid-template-columns: 1fr; } }
.bam-tuition-option { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #d8d8d8; border-radius: 6px; padding: 12px 14px; font-weight: normal; cursor: pointer; background: #fff; }
.bam-tuition-option:has(input:checked) { border-color: #146c43; background: #f3fbf6; }
.bam-tuition-option input { margin-top: 4px; }
.bam-tuition-option__price { display: block; font-size: 15px; font-weight: 700; margin-top: 2px; }

/* ---- admin control panel (front-end) ---- */
.bam-admin-portal__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
@media (max-width: 700px) { .bam-admin-portal__grid { grid-template-columns: 1fr 1fr; } }
.bam-admin-portal__link { display: block; background: #f7f7f7; border-radius: 8px; padding: 16px 18px; text-decoration: none; color: #1a1a1a; font-weight: 600; border: 1px solid #eaeaea; }
.bam-admin-portal__link:hover { background: #f0f0f0; }
.bam-admin-portal__link span { display: block; font-weight: normal; font-size: 12px; color: #666; margin-top: 4px; }
