/**
 * A2Z Core — components (directory, application form, enquiry card,
 * WhatsApp float, showcase-mode hiding). Brand-independent: works even if
 * a2z-brand.css is disabled.
 */

:root {
	--a2z-red: #8a0304;
	--a2z-red-dark: #680203;
	--a2z-red-bright: #bf0a13;
	--a2z-grey: #737071;
	--a2z-grey-light: #c4c4c4;
	--a2z-black: #151a22;
	--a2z-white: #fff;
	--a2z-surface: #fff;
	--a2z-surface-muted: #faf7f7;
	--a2z-border: #ebe6e6;
	--a2z-wa: #25d366;
	--a2z-wa-dark: #128c4b;
	--a2z-radius: 14px;
	--a2z-radius-sm: 8px;
	--a2z-shadow: 0 1px 2px rgba(21, 26, 34, .06), 0 8px 24px rgba(21, 26, 34, .06);
	--a2z-shadow-hover: 0 2px 4px rgba(21, 26, 34, .08), 0 16px 40px rgba(138, 3, 4, .12);
	--a2z-ease: cubic-bezier(.2, .7, .2, 1);
}

.a2z-anchor { display: block; position: relative; top: -120px; visibility: hidden; }

/* ---------- Buttons ---------- */
.a2z-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 48px; padding: .75em 1.4em;
	border: 2px solid transparent; border-radius: 999px;
	font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2;
	text-decoration: none !important; cursor: pointer;
	transition: background-color .2s var(--a2z-ease), color .2s var(--a2z-ease), border-color .2s var(--a2z-ease), transform .2s var(--a2z-ease), box-shadow .2s var(--a2z-ease);
}
.a2z-btn:hover { transform: translateY(-1px); }
.a2z-btn:active { transform: translateY(0); }
.a2z-btn:focus-visible { outline: 3px solid var(--a2z-red-bright); outline-offset: 3px; }
.a2z-btn--primary { background: var(--a2z-red); color: var(--a2z-white) !important; }
.a2z-btn--primary:hover { background: var(--a2z-red-dark); box-shadow: 0 8px 20px rgba(138, 3, 4, .25); }
.a2z-btn--ghost { background: transparent; color: var(--a2z-red) !important; border-color: var(--a2z-red); }
.a2z-btn--ghost:hover { background: var(--a2z-red); color: var(--a2z-white) !important; }
.a2z-btn--whatsapp { background: var(--a2z-wa); color: #fff !important; }
.a2z-btn--whatsapp:hover { background: var(--a2z-wa-dark); box-shadow: 0 8px 20px rgba(18, 140, 75, .25); }
.a2z-btn--block { display: flex; width: 100%; }
.a2z-btn svg { flex: none; }

/* ---------- Directory filters ---------- */
.a2z-directory { --a2z-gap: 24px; }
.a2z-directory__filters {
	display: grid; grid-template-columns: minmax(0, 2fr) repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
	align-items: end; margin: 0 0 24px; padding: 16px;
	background: var(--a2z-surface-muted); border: 1px solid var(--a2z-border); border-radius: var(--a2z-radius);
}
.a2z-directory__filters .a2z-field { margin: 0; }
.a2z-directory__filters input[type="search"],
.a2z-directory__filters select {
	width: 100%; height: 48px; margin: 0; padding: 0 16px;
	background: #fff; color: var(--a2z-black);
	border: 1px solid var(--a2z-grey-light); border-radius: var(--a2z-radius-sm);
	font: inherit; font-size: 15px; box-shadow: none;
}
.a2z-directory__filters input[type="search"]:focus,
.a2z-directory__filters select:focus { border-color: var(--a2z-red); outline: 3px solid rgba(191, 10, 19, .18); outline-offset: 0; }
.a2z-field--submit .a2z-btn { width: 100%; }

@media (max-width: 767px) {
	.a2z-directory__filters { grid-template-columns: 1fr; }
}

.a2z-directory__results { position: relative; min-height: 120px; transition: opacity .2s var(--a2z-ease); }
.a2z-directory.is-loading .a2z-directory__results { opacity: .45; pointer-events: none; }
.a2z-directory__count { margin: 0 0 16px; color: var(--a2z-grey); font-size: 14px; }

/* ---------- Grid + cards ---------- */
.a2z-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--a2z-gap, 24px);
	margin: 0; padding: 0; list-style: none;
}
.a2z-card {
	display: flex; flex-direction: column; margin: 0; overflow: hidden;
	background: var(--a2z-surface); border: 1px solid var(--a2z-border); border-radius: var(--a2z-radius);
	box-shadow: var(--a2z-shadow);
	transition: transform .25s var(--a2z-ease), box-shadow .25s var(--a2z-ease), border-color .25s var(--a2z-ease);
}
.a2z-card:hover { transform: translateY(-3px); box-shadow: var(--a2z-shadow-hover); border-color: rgba(138, 3, 4, .25); }
.a2z-card__media {
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 4 / 3; background: linear-gradient(135deg, #f6eeee, #fbf8f8);
}
.a2z-card--provider .a2z-card__media,
.a2z-card--partner .a2z-card__media { aspect-ratio: 16 / 9; background: #fff; border-bottom: 1px solid var(--a2z-border); }
.a2z-card__img { width: 100%; height: 100%; object-fit: cover; }
.a2z-card--provider .a2z-card__img,
.a2z-card--partner .a2z-card__img { object-fit: contain; padding: 20px; }
.a2z-avatar {
	display: inline-flex; align-items: center; justify-content: center;
	width: 96px; height: 96px; border-radius: 50%;
	background: var(--a2z-red); color: #fff; font-weight: 700; font-size: 32px; letter-spacing: .02em;
	box-shadow: 0 0 0 6px rgba(138, 3, 4, .1);
}
.a2z-card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 20px; }
.a2z-card__title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; }
.a2z-card__title a { color: var(--a2z-black); text-decoration: none; }
.a2z-card__title a:hover { color: var(--a2z-red); }
.a2z-card__credentials { margin: 0; color: var(--a2z-grey); font-size: 14px; }
.a2z-card__tag {
	align-self: flex-start; margin: 2px 0 0; padding: 3px 10px; border-radius: 999px;
	background: rgba(138, 3, 4, .08); color: var(--a2z-red); font-size: 12px; font-weight: 600;
}
.a2z-card__location { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--a2z-grey); font-size: 14px; }
.a2z-card__location svg { flex: none; color: var(--a2z-red); }
.a2z-badge { align-self: flex-start; margin: 4px 0 0; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #eee; color: var(--a2z-black); }
.a2z-badge--accredited, .a2z-badge--recognized { background: #e8f6ee; color: #0f6b3a; }
.a2z-badge--pending { background: #fff5e0; color: #8a5a00; }
.a2z-badge--expired, .a2z-badge--none { background: #f3f3f3; color: var(--a2z-grey); }
.a2z-card__contacts { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding: 12px 0 0; list-style: none; }
.a2z-card__contacts li { margin: 0; }
.a2z-chip {
	display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px;
	border: 1px solid var(--a2z-border); border-radius: 999px;
	color: var(--a2z-black) !important; font-size: 13px; font-weight: 600; text-decoration: none !important;
	transition: background-color .2s, color .2s, border-color .2s;
}
.a2z-chip:hover { background: var(--a2z-red); border-color: var(--a2z-red); color: #fff !important; }
.a2z-chip--whatsapp:hover { background: var(--a2z-wa-dark); border-color: var(--a2z-wa-dark); }
.a2z-chip:focus-visible { outline: 3px solid var(--a2z-red-bright); outline-offset: 2px; }

/* ---------- Pagination ---------- */
.a2z-pagination { margin: 32px 0 0; }
.a2z-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.a2z-pagination li { margin: 0; }
.a2z-pagination a, .a2z-pagination span {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px;
	border-radius: 999px; border: 1px solid var(--a2z-border); color: var(--a2z-black); text-decoration: none; font-weight: 600;
}
.a2z-pagination a:hover { border-color: var(--a2z-red); color: var(--a2z-red); }
.a2z-pagination [aria-current="page"] { background: var(--a2z-red); border-color: var(--a2z-red); color: #fff; }
.a2z-pagination__dots { border: 0 !important; min-width: 20px !important; }

/* ---------- Empty state ---------- */
.a2z-empty {
	padding: 48px 24px; text-align: center;
	background: var(--a2z-surface-muted); border: 1px dashed var(--a2z-grey-light); border-radius: var(--a2z-radius);
}
.a2z-empty__icon { display: inline-flex; padding: 16px; margin-bottom: 12px; border-radius: 50%; background: rgba(138, 3, 4, .08); color: var(--a2z-red); }
.a2z-empty__title { margin: 0 0 8px; font-size: 22px; }
.a2z-empty p { max-width: 46ch; margin: 0 auto 12px; color: var(--a2z-grey); }
.a2z-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px !important; }

/* ---------- Application form ---------- */
.a2z-apply__form { padding: 28px; background: var(--a2z-surface); border: 1px solid var(--a2z-border); border-radius: var(--a2z-radius); box-shadow: var(--a2z-shadow); }
.a2z-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
.a2z-form-row { margin: 0 0 14px; }
.a2z-form-row--full { grid-column: 1 / -1; }
.a2z-form-row label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: var(--a2z-black); }
.a2z-form-row input, .a2z-form-row select, .a2z-form-row textarea {
	width: 100%; margin: 0; padding: 12px 14px; min-height: 48px;
	border: 1px solid var(--a2z-grey-light); border-radius: var(--a2z-radius-sm); background: #fff; font: inherit; font-size: 15px;
}
.a2z-form-row input:focus, .a2z-form-row select:focus, .a2z-form-row textarea:focus { border-color: var(--a2z-red); outline: 3px solid rgba(191, 10, 19, .18); outline-offset: 0; }
.a2z-req { color: var(--a2z-red-bright); }
.a2z-form-consent { color: var(--a2z-grey); font-size: 13px; margin: 4px 0 16px; }
.a2z-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.a2z-alert { margin: 0 0 20px; padding: 14px 18px; border-radius: var(--a2z-radius-sm); border-inline-start: 4px solid; font-weight: 500; }
.a2z-alert--success { background: #e8f6ee; border-color: #0f6b3a; color: #0b4d2a; }
.a2z-alert--error { background: #fdecec; border-color: var(--a2z-red-bright); color: var(--a2z-red-dark); }
@media (max-width: 640px) {
	.a2z-form-grid { grid-template-columns: 1fr; }
	.a2z-apply__form { padding: 20px; }
}

/* ---------- Enquiry card ---------- */
.a2z-enquire {
	position: relative; margin: 0 0 30px; padding: 28px;
	background: var(--a2z-surface); border: 1px solid var(--a2z-border); border-radius: var(--a2z-radius);
	box-shadow: var(--a2z-shadow); border-top: 4px solid var(--a2z-red);
}
.a2z-enquire__title { margin: 0 0 6px; font-size: 22px; line-height: 1.25; color: var(--a2z-black); }
.a2z-enquire__course { margin: 0 0 8px; color: var(--a2z-red); font-weight: 600; font-size: 15px; }
.a2z-enquire__text { margin: 0 0 18px; color: var(--a2z-grey); font-size: 15px; }
.a2z-enquire__actions { display: grid; gap: 10px; }
.a2z-enquire__more { margin: 16px 0 0; text-align: center; font-size: 14px; }
.a2z-enquire__more a { color: var(--a2z-red); font-weight: 600; }
.a2z-enquire--inline { max-width: 460px; }
[dir="rtl"] .a2z-enquire__more a { unicode-bidi: plaintext; }

/* ---------- Floating WhatsApp ---------- */
.a2z-wa-float {
	position: fixed; z-index: 9990; right: 20px; bottom: 20px;
	display: inline-flex; align-items: center; gap: 8px;
	height: 56px; padding: 0 18px 0 16px; border-radius: 999px;
	background: var(--a2z-red); color: #fff !important; text-decoration: none !important;
	font-weight: 600; font-size: 15px;
	box-shadow: 0 10px 30px rgba(104, 2, 3, .35);
	transition: transform .2s var(--a2z-ease), background-color .2s var(--a2z-ease), box-shadow .2s var(--a2z-ease);
}
.a2z-wa-float svg { width: 26px; height: 26px; }
.a2z-wa-float:hover { background: var(--a2z-red-dark); transform: translateY(-2px); box-shadow: 0 14px 36px rgba(104, 2, 3, .45); }
.a2z-wa-float:focus-visible { outline: 3px solid var(--a2z-red-bright); outline-offset: 3px; }
[dir="rtl"] .a2z-wa-float { right: auto; left: 20px; }
@media (max-width: 600px) {
	.a2z-wa-float { width: 56px; padding: 0; justify-content: center; right: 16px; bottom: 16px; }
	[dir="rtl"] .a2z-wa-float { left: 16px; right: auto; }
	.a2z-wa-float__label { display: none; }
}
@media print { .a2z-wa-float { display: none; } }
/* Keep clear of HiStudy's back-to-top button. */
.rbt-progress-parent, .rbt-progress-parent.rbt-backto-top-active { bottom: 90px !important; }

/* ---------- Showcase mode: hide purchase / enrol UI ---------- */
body.a2z-showcase .tutor-btn-enroll,
body.a2z-showcase .tutor-enroll-course-button,
body.a2z-showcase .tutor-add-to-cart-button,
body.a2z-showcase .tutor-course-single-btn-group,
body.a2z-showcase .tutor-course-sidebar-card .tutor-card-body > .tutor-mb-32 form,
body.a2z-showcase .tutor-course-sidebar-card .tutor-course-single-pricing,
body.a2z-showcase .tutor-course-price,
body.a2z-showcase .tutor-item-price,
body.a2z-showcase .tutor-course-loop-price,
body.a2z-showcase .tutor-course-wishlist-btn,
body.a2z-showcase .tutor-iconic-btn-wishlist,
body.a2z-showcase .save-bookmark-btn,
body.a2z-showcase .tutor-course-bookmark,
body.a2z-showcase .tutor-loop-cart-btn-wrap,
body.a2z-showcase .tutor-course-booking-availability,
body.a2z-showcase .rbt-price,
body.a2z-showcase .rbt-card .rbt-card-bottom .rbt-price,
body.a2z-showcase .rbt-card .rbt-bookmark-btn,
body.a2z-showcase .rbt-bookmark-btn,
body.a2z-showcase .rbt-wishlist,
body.a2z-showcase .rbt-course-action-bottom .rbt-btn:not(.a2z-btn),
body.a2z-showcase .rbt-buy-now-btn,
body.a2z-showcase .rbt-add-to-cart-btn,
body.a2z-showcase .add_to_cart_button,
body.a2z-showcase .single_add_to_cart_button,
body.a2z-showcase .woocommerce-mini-cart,
body.a2z-showcase .rbt-cart-sidenav,
body.a2z-showcase .rbt-cart-sidenav-activation,
body.a2z-showcase .rbt-header .rbt-cart-count,
body.a2z-showcase .rbt-header .access-icon .rbt-cart-sidenav-activation {
	display: none !important;
}

/* HiStudy course card footer: keep "Learn more" link, drop price column. */
body.a2z-showcase .rbt-card .rbt-card-bottom { justify-content: flex-end; }
body.a2z-showcase .rbt-card .rbt-card-bottom .rbt-btn-link { margin-inline-start: auto; }

/* Tutor sidebar: our card replaces the enrol box; keep remaining widgets tidy. */
body.a2z-showcase .tutor-course-sidebar-card:empty { display: none; }
.a2z-loop-footer { padding: 16px; }
