/* APMA registration. Scoped to .apma-reg.
   The theme stylesheet wasn't readable from here: set the 5 tokens below to the theme's values
   (copy them from the Visa-application form) and the rest follows. */
.apma-reg {
	--apma-primary: #11113B;
	--apma-primary-dark: #123a75;
	--apma-text: #222;
	--apma-muted: #555;
	--apma-border: #11113B;
	--apma-error: #c0392b;
	--apma-radius: 5px;
	--apma-btn: #981B1E;
	--apma-btn-hover: #c30b0f;
	color: var(--apma-text);
}
.apma-reg *, .apma-reg *::before, .apma-reg *::after { box-sizing: border-box; }
.apma-reg__wrap { width: 100%; max-width: none; margin: 0; }
.apma-reg__banner { background: var(--apma-primary); color: #fff; padding: 48px 0 32px; }
.apma-reg__banner h1 { margin: 0 0 12px; color: inherit; }
.apma-reg__meta { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; flex-wrap: wrap; }
.apma-reg__meta strong { display: block; opacity: .75; font-weight: 400; font-size: .85em; }
.apma-reg__body { padding-top: 32px; padding-bottom: 64px; }

/* Theme CSS may restyle <section>/[hidden]; make sure inactive tab panels never show. */
.apma-reg [hidden] { display: none !important; }
.apma-reg__step:not(.is-active) { display: none !important; }

.apma-reg__steps { margin: 0 0 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; border-bottom: 1px solid var(--apma-border); }
.apma-reg__tab { counter-increment: s; background: none; border: 0; border-bottom: 4px solid transparent; margin-bottom: -1px; padding: 12px 8px; font: inherit; font-size: .9rem; color: var(--apma-muted); text-align: left; cursor: default; border-radius: 0; }
.apma-reg__tab::before { content: counter(s) ". "; }
.apma-reg__tab:disabled { opacity: .55; }
.apma-reg__tab.is-done { cursor: pointer; color: var(--apma-primary); border-bottom-color: var(--apma-primary); }
.apma-reg__tab[aria-selected="true"] { color: var(--apma-text); font-weight: 600; border-bottom-color: var(--apma-primary); }
.apma-reg__tab:focus-visible { outline: 3px solid color-mix(in srgb, var(--apma-primary) 40%, transparent); outline-offset: -3px; }
.apma-reg__gate { max-width: 420px; margin: 16px 0 24px; display: grid; gap: 12px; justify-items: start; }
.apma-reg__gate .apma-reg__field { width: 100%; }
.apma-reg__gate input[readonly] { background: #f1f8f3; }

.apma-reg__step:focus { outline: none; }
.apma-reg__step h2 { font-size: 24px; margin: 0 0 20px; }
.apma-reg__step h2:not(:first-child) { margin-top: 32px; }
.apma-reg__hint, .apma-reg__field small, .apma-reg__activity small, .apma-reg__summary small { color: var(--apma-muted); font-size: 14px; line-height: 20px; display: inline-block; margin-top: 10px; }
.apma-reg__hint { display: block; }

/* Section heading with an action link on the right (e.g. "Participant details ......... Edit details") */
.apma-reg__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 32px 0 20px; }
.apma-reg__step .apma-reg__head h2 { margin: 0; }

/* 6-column grid: first three cards span 2 columns each (3 per row); every card after the 3rd spans 3 (2 per row, full width).
   Written for 5 types (3 + 2). */
.apma-reg__types { border: 0; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.apma-reg__type { grid-column: span 2; }
.apma-reg__type:nth-of-type(n+4) { grid-column: span 3; }
.apma-reg__type { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 12px 12px; align-items: start; border: 1px solid var(--apma-border); border-radius: var(--apma-radius); padding: 16px; cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
.apma-reg__type:hover { background: #fafbff; }
.apma-reg__type:has(input:checked) { border-color: var(--apma-primary); box-shadow: 0 0 0 2px var(--apma-primary) inset; background: #f4f5fb; }
.apma-reg__type:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--apma-primary) 40%, transparent); outline-offset: 2px; }
.apma-reg__type input { margin-top: 4px; }
.apma-reg__type-body { display: grid; gap: 2px; }
.apma-reg__type-body strong { margin-bottom: 8px; }
.apma-reg__type-body span { font-size: 13px; line-height: 17px; color: var(--apma-muted); font-size: .9rem; }
.apma-reg__type-price { grid-column: 2; display: grid; gap: 2px; text-align: left; justify-items: start; padding-top: 10px; margin-top: 20px; }
.apma-reg__type-price strong { font-size: 22px; font-weight: 500; }
.apma-reg__type-price small { font-size: 13px; color: var(--apma-muted); margin-top: 5px; }

/* Modern radio: round, navy ring, filled dot when selected */
.apma-reg .apma-reg__type input[type="radio"] {
	-webkit-appearance: none; appearance: none;
	display: grid; place-content: center; flex: none;
	width: 20px; height: 20px; margin: 1px 0 0; padding: 0;
	border: 2px solid #aeb2c4; border-radius: 50%; background: #fff;
	cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.apma-reg .apma-reg__type input[type="radio"]::before {
	content: ""; width: 12px; height: 12px; border-radius: 50%;
	background: var(--apma-primary); transform: scale(0); transition: transform .15s ease;
}
.apma-reg .apma-reg__type:hover input[type="radio"] { border-color: var(--apma-primary); }
.apma-reg .apma-reg__type input[type="radio"]:checked { border-color: var(--apma-primary); }
.apma-reg .apma-reg__type input[type="radio"]:checked::before { transform: scale(1); }

.apma-reg__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 20px; margin: 16px 0; }
.apma-reg__grid[hidden], .apma-reg__field[hidden] { display: none; }
.apma-reg__field--full { grid-column: 1 / -1; }
.apma-reg__field label { display: block; font-weight: 600; margin-bottom: 15px; }
.apma-reg__field input, .apma-reg__field select, .apma-reg__field textarea {
	width: 100%; padding: 16px; font: inherit; font-size: 16px; line-height: 16px; color: inherit; background: #fff;
	border: 2px solid var(--apma-border); border-radius: var(--apma-radius);
}
.apma-reg__field select { height: 56px; appearance: none; outline: none; }
.apma-reg__field-select-wrapper { position: relative; }
.apma-reg__field-select-wrapper::after { 
	font-family: 'Material Symbols Outlined';
    content: "\e69b";
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 34px;
    line-height: 34px;
    font-weight: 500;
    color: #11113B;
}
.apma-reg__field input:focus, .apma-reg__field select:focus, .apma-reg__field textarea:focus,
.apma-reg__btn:focus-visible, .apma-reg__link:focus-visible { border: 2px solid #2d2d91; }
.apma-reg .has-error { border-color: var(--apma-error); }
.apma-reg__field-error { color: var(--apma-error); font-size: 13px; line-height: 18px; margin: 8px 0 0; }
.apma-reg__error { color: var(--apma-error); margin: 12px 0 0; }
.apma-reg__error[hidden] { display: none; }

.apma-reg__activity { border: 1px solid var(--apma-border); border-radius: var(--apma-radius); padding: 16px; }
.apma-reg__activity h3 { margin: 0 0 10px; }
.apma-reg__activity p { margin: 0 0 4px; }
.apma-reg__check { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.apma-reg__check input { margin-top: 1px; }
.apma-reg__activity .apma-reg__check { margin-top: 20px; align-items: center; }
.apma-reg__activity .note { border-top: 1px solid #ddd; padding-top: 10px; margin-top: 20px; }
.apma-reg__activity .note small {  }

/* Modern checkbox: rounded square, navy fill with a white tick when checked (used by every .apma-reg__check) */
.apma-reg .apma-reg__check input[type="checkbox"] {
	-webkit-appearance: none; appearance: none;
	flex: none; width: 20px; height: 20px; margin: 1px 0 0; padding: 0;
	border: 2px solid var(--apma-border); border-radius: 6px; background-color: #fff;
	background-repeat: no-repeat; background-position: center; background-size: 16px 16px;
	cursor: pointer; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.apma-reg .apma-reg__activity .apma-reg__check input[type="checkbox"] { margin-top: 0; }
.apma-reg .apma-reg__check:hover input[type="checkbox"] { box-shadow: 0 0 0 4px color-mix(in srgb, var(--apma-primary) 12%, transparent); }
.apma-reg .apma-reg__check input[type="checkbox"]:checked {
	background-color: var(--apma-primary); border-color: var(--apma-primary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.apma-reg .apma-reg__check input[type="checkbox"]:focus-visible { outline: 3px solid color-mix(in srgb, var(--apma-primary) 40%, transparent); outline-offset: 2px; }
.apma-reg .apma-reg__check input[type="checkbox"].has-error { border-color: var(--apma-error); }

.apma-reg__recap { display: grid; grid-template-columns: 1fr 1fr; gap: 25px 25px; }
.apma-reg__recap div {  }
.apma-reg__recap dt { font-size: 14px; color: var(--apma-muted); }
.apma-reg__recap dd { font-weight: 500; margin: 5px 0 0 0; }
.apma-reg__terms { margin-top: 32px; padding: 16px; background: #f5f6f8; border-radius: var(--apma-radius); }
.apma-reg__terms p strong { display: inline-block; margin-bottom: 10px; }
.apma-reg__terms .apma-reg__check { margin-top: 10px; }

.apma-reg__summary { border: 1px solid var(--apma-border); border-radius: var(--apma-radius); padding: 16px 20px; margin: 20px 0; }
.apma-reg__summary h3 { margin: 0 0 8px; }
.apma-reg__summary table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.apma-reg__summary td { padding: 8px 0; border-bottom: 1px solid #eceef0; }
.apma-reg__summary td:last-child { text-align: right; white-space: nowrap; }
.apma-reg__summary .is-total td { font-weight: 700; }

.apma-reg__free { margin: 8px 0 12px; padding: 14px 16px; background: #f1f8f3; border-left: 4px solid #2e8b57; border-radius: var(--apma-radius); }
.apma-reg__free p { margin: 6px 0 0; }

.apma-reg__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.apma-reg__nav > :only-child { margin-left: auto; }
.apma-reg__btn { display: inline-block; background: var(--apma-btn); color: #fff; border-radius: var(--apma-radius); padding: 12px 40px; height: 56px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; border: none; }
.apma-reg__btn:hover { background: var(--apma-btn-hover); }
.apma-reg__btn--ghost { background: transparent; color: var(--apma-primary); border: 2px solid var(--apma-primary); border-radius: var(--apma-radius); padding: 12px 40px; height: 56px; }
.apma-reg__btn--ghost:hover { background: #EDF3FC; color: var(--apma-primary-dark); }
.apma-reg__btn:disabled { opacity: .6; cursor: not-allowed; }
.apma-reg__link { background: none; border: 0; padding: 0; color: var(--apma-primary); text-decoration: underline; cursor: pointer; font: inherit; }


.apma-reg__result { border: 1px solid var(--apma-border); border-left: 6px solid #2e8b57; border-radius: var(--apma-radius); padding: 24px; }
.apma-reg__result--warn { border-left-color: var(--apma-error); }
.apma-reg__result h2 { margin-top: 0; }
.apma-reg__result p {
	margin-top: 10px;
}

@media (max-width: 960px) {
	.apma-reg__types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.apma-reg__type, .apma-reg__type:nth-of-type(n+4) { grid-column: auto; }
	.apma-reg__type:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
}
.apma-reg__notes { margin-top: 30px; background: #fafafa; padding: 10px; border-radius: 5px; }
.apma-reg__notes .apma-reg__hint { font-size: 14px; margin: 0 0 6px; }
.apma-reg__notes .apma-reg__hint:nth-last-child() { margin-bottom: 0; }

@media (max-width: 640px) {
	.apma-reg__types { grid-template-columns: 1fr; }
	.apma-reg__type:last-of-type:nth-of-type(odd) { grid-column: auto; }
	.apma-reg__grid { grid-template-columns: 1fr; }
	.apma-reg__steps { grid-template-columns: repeat(2, 1fr); }
	.apma-reg__tab { padding: 10px 6px; }
	.apma-reg__activity { flex-direction: column; align-items: flex-start; }
	.apma-reg__recap div { grid-template-columns: 1fr; gap: 0; }
	.apma-reg__nav { flex-direction: column-reverse; }
	.apma-reg__nav > :only-child { margin-left: 0; }
}
