/**
 * Front-end styling for student fields.
 *
 * Namespaced under .cst-* and deliberately minimal so fields inherit the
 * theme's form styling rather than fighting it. Logical properties keep it
 * correct in RTL.
 */

.cst-profile-fields {
	list-style: none;
	margin: 12px 0;
	padding: 0;
	display: grid;
	gap: 6px;
}

.cst-profile-fields__item {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: baseline;
	padding-block: 4px;
	border-block-end: 1px solid rgba(0, 0, 0, 0.08);
}

.cst-profile-fields__label {
	font-weight: 600;
	min-width: 10ch;
}

.cst-profile-fields__value {
	/* Phone numbers stay readable inside Arabic text. */
	unicode-bidi: plaintext;
}

.cst-tutor-fields {
	display: grid;
	gap: 12px;
	margin-block: 16px;
}

.cst-tutor-fields .cst-field,
.cst-fields-form .cst-field {
	margin: 0;
}

.cst-tutor-fields label,
.cst-fields-form label {
	display: block;
	font-weight: 600;
	margin-block-end: 4px;
}

.cst-tutor-fields input[type="text"],
.cst-tutor-fields input[type="tel"],
.cst-tutor-fields input[type="email"],
.cst-tutor-fields input[type="number"],
.cst-tutor-fields input[type="date"],
.cst-tutor-fields select,
.cst-tutor-fields textarea,
.cst-fields-form input,
.cst-fields-form select,
.cst-fields-form textarea {
	width: 100%;
	max-width: 420px;
	min-height: 44px;
}

.cst-tutor-fields .cst-checkbox,
.cst-fields-form .cst-checkbox {
	font-weight: 400;
}

.cst-tutor-fields .cst-checkbox input,
.cst-fields-form .cst-checkbox input {
	width: auto;
	min-height: 0;
	margin-inline-end: 6px;
}

/* --- Info icon and tooltip ------------------------------------------ */

.cst-help {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	margin-inline-start: 6px;
	line-height: 1;
}

.cst-help__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	opacity: 0.65;
	font-size: 12px;
	font-weight: 700;
	font-style: italic;
	font-family: Georgia, "Times New Roman", serif;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.cst-help__icon:hover,
.cst-help__icon:focus-visible,
.cst-help.is-open .cst-help__icon {
	opacity: 1;
}

.cst-help__icon:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.cst-help__tip {
	position: absolute;
	z-index: 60;
	inset-block-end: calc(100% + 10px);
	inset-inline-start: 50%;
	transform: translateX(-50%);
	width: max-content;
	max-width: min(280px, 80vw);
	padding: 12px 14px;
	border-radius: 10px;
	background: #1d2327;
	color: #fff;
	font-size: 13px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.5;
	text-align: start;
	white-space: normal;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

/* The bubble is positioned from its own centre, so the arrow is centred too. */
.cst-help__tip::after {
	content: "";
	position: absolute;
	inset-block-start: 100%;
	inset-inline-start: 50%;
	margin-inline-start: -6px;
	border: 6px solid transparent;
	border-block-start-color: #1d2327;
}

.cst-help__tip[hidden] {
	display: none;
}

.cst-help__text {
	display: block;
}

.cst-help__image {
	display: block;
	max-width: 100%;
	height: auto;
	margin-block-start: 10px;
	border-radius: 6px;
}

/* On narrow screens the bubble spans the field instead of ballooning. */
@media (max-width: 600px) {
	.cst-help__tip {
		max-width: 78vw;
	}
}

/* Stage archive notices. Logical properties so RTL needs no second file. */

.cst-notice {
	margin-block: 1.5rem;
	padding: 1.5rem;
	border-radius: 10px;
	background: #f6f7f9;
	text-align: center;
}

.cst-notice--wrong-stage {
	background: #eef4fb;
	border: 1px solid #cfe0f5;
}

.cst-notice__text {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.7;
	color: #333;
}

.cst-notice__actions {
	margin-block: 1rem 0;
}

.cst-notice__button {
	display: inline-block;
	padding: 0.7rem 1.6rem;
	border-radius: 999px;
	background: #14549b;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	line-height: 1.4;
}

.cst-notice__button:hover,
.cst-notice__button:focus {
	background: #0f3f75;
	color: #fff;
}
