/* ==========================================================================
   Academia Acordes — Front-end form styles
   Font: Nunito (loaded separately via Google Fonts)
   ========================================================================== */

.aa-wrapper {
	font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	color: #2a2a3a;
	line-height: 1.5;
	max-width: 960px;
	margin: 40px auto;
	padding: 0 16px;
	box-sizing: border-box;
}

.aa-wrapper *,
.aa-wrapper *::before,
.aa-wrapper *::after {
	box-sizing: border-box;
}

/* ---------- CARD ---------- */
.aa-card {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(45, 30, 90, 0.08), 0 2px 6px rgba(45, 30, 90, 0.04);
	overflow: hidden;
}

/* ---------- HEADER ---------- */
.aa-header {
	background: linear-gradient(135deg, #6a4fb6 0%, #9b6dff 100%);
	color: #fff;
	padding: 40px 32px 32px;
	text-align: center;
	position: relative;
}

.aa-header::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 24px;
	background: #fff;
	border-radius: 24px 24px 0 0;
}

.aa-title {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(1.8rem, 4vw, 2.4rem);
	font-weight: 800;
	letter-spacing: 0.05em;
	margin: 0 0 4px;
	color: #fff;
}

.aa-logo {
	display: block;
	max-width: 320px;
	width: 100%;
	height: auto;
	margin: 0 auto 8px;
}

.aa-subtitle {
	font-size: clamp(1.4rem, 3vw, 1.8rem);
	font-weight: 700;
	margin: 0 0 8px;
	opacity: 1;
}

.aa-semester {
	font-size: 0.9rem;
	font-weight: 400;
	margin: 8px 0 0;
	opacity: 0.85;
}

/* ---------- INTRO ---------- */
.aa-intro {
	padding: 28px 32px 0;
	font-size: 0.92rem;
	color: #555;
	line-height: 1.6;
}

.aa-intro p {
	background: #f5f3fa;
	border-left: 4px solid #6a4fb6;
	padding: 16px 20px;
	border-radius: 0 12px 12px 0;
	margin: 0;
}

/* ---------- ALERTS ---------- */
.aa-alert {
	margin: 24px 32px 0;
	padding: 16px 20px;
	border-radius: 12px;
	font-weight: 600;
}
.aa-alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.aa-alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.aa-alert h3      { margin: 0 0 6px; }

/* ---------- FORM ---------- */
.aa-form {
	padding: 24px 32px 8px;
}

.aa-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.aa-section {
	border: 1px solid #ece9f4;
	border-radius: 14px;
	padding: 24px;
	margin: 24px 0;
	background: #fcfbff;
}

.aa-section > legend {
	font-weight: 800;
	font-size: 1.1rem;
	color: #6a4fb6;
	padding: 4px 14px;
	background: #fff;
	border: 1px solid #ece9f4;
	border-radius: 999px;
	margin-left: 8px;
}

.aa-section-intro {
	font-size: 0.9rem;
	color: #666;
	margin: 0 0 16px;
}

/* ---------- GRID ---------- */
.aa-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 16px;
}

.aa-col-12 { grid-column: span 12; }
.aa-col-6  { grid-column: span 6; }
.aa-col-4  { grid-column: span 4; }

@media (max-width: 700px) {
	.aa-col-6, .aa-col-4 { grid-column: span 12; }
}

/* ---------- FIELDS ---------- */
.aa-field { display: flex; flex-direction: column; }

.aa-field label {
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 6px;
	color: #2a2a3a;
}

.aa-req { color: #e02d2d; font-weight: 700; }
.aa-opt { font-weight: 400; color: #888; font-size: 0.85rem; }

.aa-field input[type="text"],
.aa-field input[type="email"],
.aa-field input[type="tel"],
.aa-field input[type="number"],
.aa-field input[type="date"],
.aa-field textarea,
.aa-field select {
	font-family: inherit;
	font-size: 0.95rem;
	padding: 11px 14px;
	border: 1.5px solid #e1ddf0;
	border-radius: 10px;
	background: #fff;
	color: #2a2a3a;
	transition: border-color .15s, box-shadow .15s;
	width: 100%;
}

.aa-field input:focus,
.aa-field textarea:focus,
.aa-field select:focus {
	outline: none;
	border-color: #6a4fb6;
	box-shadow: 0 0 0 3px rgba(106, 79, 182, 0.15);
}

.aa-field textarea { resize: vertical; min-height: 56px; }

.aa-hint {
	font-size: 0.8rem;
	color: #888;
	margin: 6px 0 0;
}

.aa-field.aa-error input,
.aa-field.aa-error textarea,
.aa-field.aa-error select {
	border-color: #e02d2d;
	background: #fef2f2;
}

.aa-field-error {
	color: #b91c1c;
	font-size: 0.82rem;
	margin-top: 6px;
}

/* ---------- RADIO GROUPS ---------- */
.aa-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.aa-radio {
	position: relative;
	cursor: pointer;
}

.aa-radio input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.aa-radio span {
	display: inline-block;
	padding: 9px 16px;
	background: #fff;
	border: 1.5px solid #e1ddf0;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	color: #555;
	transition: all .15s;
}

.aa-radio:hover span { border-color: #b8a8e5; color: #6a4fb6; }
.aa-radio input:checked + span {
	background: #6a4fb6;
	border-color: #6a4fb6;
	color: #fff;
}
.aa-radio input:focus-visible + span {
	box-shadow: 0 0 0 3px rgba(106, 79, 182, 0.25);
}

/* ---------- AGREEMENT ROWS ---------- */
.aa-agreement-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #ece9f4;
	border-radius: 10px;
	margin-bottom: 8px;
}

.aa-agreement-text {
	font-size: 0.92rem;
	font-weight: 500;
	flex: 1;
}

@media (max-width: 600px) {
	.aa-agreement-row {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ---------- COURSES ---------- */
.aa-course-category { margin-bottom: 20px; }

.aa-course-cat-title {
	font-size: 1rem;
	font-weight: 700;
	color: #6a4fb6;
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 2px dashed #e1ddf0;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}

.aa-course-teacher {
	font-weight: 500;
	color: #888;
	font-size: 0.85rem;
}

.aa-course-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 10px;
}

.aa-course-card {
	display: flex;
	position: relative;
	cursor: pointer;
	border: 1.5px solid #e1ddf0;
	border-radius: 12px;
	padding: 14px;
	background: #fff;
	transition: all .15s;
}

.aa-course-card:hover { border-color: #b8a8e5; transform: translateY(-1px); }
.aa-course-card input { position: absolute; opacity: 0; pointer-events: none; }
.aa-course-card-body { display: flex; flex-direction: column; gap: 2px; width: 100%; padding-left: 28px; position: relative; }

.aa-course-card-body::before {
	content: "";
	position: absolute;
	left: 0; top: 2px;
	width: 20px;
	height: 20px;
	border: 2px solid #cfc8ea;
	border-radius: 6px;
	background: #fff;
	transition: all .15s;
}

/* Pure-CSS checkmark drawn with a second pseudo-element (rotated borders). */
.aa-course-card-body::after {
	content: "";
	position: absolute;
	left: 6px; top: 5px;
	width: 6px;
	height: 11px;
	border-right: 2.5px solid #fff;
	border-bottom: 2.5px solid #fff;
	transform: rotate(45deg);
	opacity: 0;
	transition: opacity .15s;
}

.aa-course-card input:checked + .aa-course-card-body::before {
	background: #6a4fb6;
	border-color: #6a4fb6;
}

.aa-course-card input:checked + .aa-course-card-body::after {
	opacity: 1;
}

.aa-course-card input:checked ~ .aa-course-card-body { color: #2a2a3a; }
.aa-course-card:has(input:checked) {
	border-color: #6a4fb6;
	background: #f5f3fa;
}

.aa-course-name { font-weight: 700; font-size: 0.95rem; }
.aa-course-schedule { font-size: 0.85rem; color: #666; }
.aa-course-fee { font-weight: 700; color: #6a4fb6; font-size: 0.9rem; margin-top: 4px; }

.aa-course-note {
	margin: 16px 0 0;
	padding: 12px 16px;
	background: #fdf8e8;
	border-left: 3px solid #d4a017;
	border-radius: 0 8px 8px 0;
	font-size: 0.85rem;
	color: #6b5a1f;
	font-style: italic;
}

/* ---------- TOTAL BOX ---------- */
.aa-total-box {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	background: linear-gradient(135deg, #6a4fb6 0%, #9b6dff 100%);
	color: #fff;
	padding: 18px 24px;
	border-radius: 12px;
	margin-top: 20px;
}

.aa-total-label { font-weight: 500; opacity: 0.9; margin-right: 8px; }
.aa-total-count, .aa-total-amount {
	font-weight: 800;
	font-size: 1.3rem;
	letter-spacing: 0.02em;
}

/* ---------- PAYMENT METHODS ---------- */
.aa-payment-section { background: #fff8ef; border-color: #f3e1c2; }

.aa-payment-methods {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}

.aa-payment-method {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px;
	background: #fff;
	border: 1px solid #f3e1c2;
	border-radius: 10px;
}

.aa-payment-details { display: flex; flex-direction: column; }
.aa-payment-details strong { font-size: 0.95rem; color: #2a2a3a; }
.aa-payment-details span { font-size: 0.85rem; color: #666; word-break: break-all; }

/* ---------- SUBMIT ---------- */
.aa-submit-row { text-align: center; padding: 16px 0 32px; }

.aa-submit-btn {
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	padding: 16px 36px;
	background: linear-gradient(135deg, #6a4fb6 0%, #9b6dff 100%);
	color: #fff;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(106, 79, 182, 0.3);
	transition: transform .15s, box-shadow .15s;
}

.aa-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(106, 79, 182, 0.4);
}

.aa-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.aa-submit-note {
	font-size: 0.85rem;
	color: #777;
	margin: 10px 0 0;
}

/* ---------- FOOTER ---------- */
.aa-footer {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	padding: 28px 32px;
	background: #f5f3fa;
	font-size: 0.88rem;
	color: #555;
}

.aa-footer h4 { font-size: 0.95rem; color: #6a4fb6; margin: 0 0 8px; }
.aa-footer p  { margin: 4px 0; }
.aa-footer a  { color: #6a4fb6; text-decoration: none; font-weight: 600; }
.aa-footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
	.aa-footer { grid-template-columns: 1fr; }
	.aa-header { padding: 32px 20px 28px; }
	.aa-intro, .aa-form, .aa-footer { padding-left: 20px; padding-right: 20px; }
	.aa-section { padding: 18px; }
}

/* ---------- CONDITIONAL VISIBILITY ---------- */
.aa-conditional[hidden] { display: none !important; }
