/* APHM Conference registration — edit this file directly; no build step required. */

:root {
    --aphm-red: #8e1924;
    --aphm-red-dark: #6b131c;
    --aphm-red-soft: #faf0f1;
    --aphm-black: #111827;
    --aphm-gray-700: #374151;
    --aphm-gray-500: #6b7280;
    --aphm-gray-300: #d1d5db;
    --aphm-gray-100: #f3f4f6;
    --aphm-white: #ffffff;
    --aphm-shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
    --aphm-shadow-md: 0 4px 24px rgba(17, 24, 39, 0.08);
    --aphm-shadow-lg: 0 12px 40px rgba(17, 24, 39, 0.1);
    --aphm-radius: 0.75rem;
    --aphm-radius-lg: 1rem;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

.aphm-body {
    background: linear-gradient(180deg, #fafbfc 0%, #f0f2f5 100%);
    color: var(--aphm-black);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.aphm-page {
    position: relative;
    min-height: 100vh;
}

.aphm-page__accent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--aphm-red) 0%, #a82230 50%, var(--aphm-red) 100%);
    z-index: 100;
}

/* ── Header ───────────────────────────────────────────────────────────── */

.aphm-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.aphm-logo {
    max-width: min(100%, 280px);
    height: auto;
    display: inline-block;
}

/* ── Event header ─────────────────────────────────────────────────────── */

.aphm-event-header {
    background: var(--aphm-white);
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: var(--aphm-radius-lg);
    box-shadow: var(--aphm-shadow-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.aphm-event-header__hero {
    background: linear-gradient(135deg, var(--aphm-black) 0%, #1e293b 100%);
    color: var(--aphm-white);
    padding: 2rem 1.75rem 1.75rem;
    position: relative;
}

.aphm-event-header__hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--aphm-red), #a82230);
}

.aphm-event-header__title {
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.aphm-event-header__meta {
    display: grid;
    gap: 0.75rem;
}

.aphm-event-header__meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.aphm-event-header__meta-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: #d4848c;
    font-size: 0.875rem;
}

.aphm-event-header__meta-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.125rem;
}

.aphm-event-header__venue-name {
    display: block;
    font-weight: 600;
}

.aphm-event-header__venue-address {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 0.125rem;
}

.aphm-event-header__body {
    padding: 1.75rem;
}

.aphm-event-header__notice {
    background: var(--aphm-gray-100);
    border-radius: var(--aphm-radius);
    padding: 1rem 1.125rem;
    font-size: 0.875rem;
    color: var(--aphm-gray-700);
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.aphm-event-header__fees-title {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--aphm-gray-500);
    margin-bottom: 0.75rem;
}

.aphm-fee-table {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.aphm-fee-table td {
    vertical-align: middle;
    padding: 0.875rem 1.125rem;
    border-color: var(--aphm-gray-300);
    font-size: 0.9375rem;
}

.aphm-fee-table tr:first-child td:first-child {
    border-top-left-radius: var(--aphm-radius);
}

.aphm-fee-table tr:first-child td:last-child {
    border-top-right-radius: var(--aphm-radius);
}

.aphm-fee-table tr:last-child td:first-child {
    border-bottom-left-radius: var(--aphm-radius);
}

.aphm-fee-table tr:last-child td:last-child {
    border-bottom-right-radius: var(--aphm-radius);
}

.aphm-fee-table td:last-child {
    background: var(--aphm-gray-100);
    color: var(--aphm-black);
    white-space: nowrap;
}

/* ── Step indicator ───────────────────────────────────────────────────── */

.aphm-steps {
    background: var(--aphm-white);
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: var(--aphm-radius-lg);
    box-shadow: var(--aphm-shadow-sm);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.aphm-steps__list {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 0;
    position: relative;
}

.aphm-steps__item {
    position: relative;
    flex: 1;
    text-align: center;
    opacity: 0.45;
    transition: opacity 0.2s ease;
}

.aphm-steps__item.is-active,
.aphm-steps__item.is-done {
    opacity: 1;
}

.aphm-steps__item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1rem;
    left: calc(50% + 1.25rem);
    right: calc(-50% + 1.25rem);
    height: 2px;
    background: var(--aphm-gray-300);
    z-index: 0;
}

.aphm-steps__item.is-done:not(:last-child)::after {
    background: var(--aphm-red);
}

.aphm-steps__badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--aphm-gray-100);
    border: 2px solid var(--aphm-gray-300);
    color: var(--aphm-gray-500);
    font-weight: 700;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
}

.aphm-steps__item.is-active .aphm-steps__badge {
    background: var(--aphm-red);
    border-color: var(--aphm-red);
    color: var(--aphm-white);
    box-shadow: 0 0 0 4px var(--aphm-red-soft);
}

.aphm-steps__item.is-done .aphm-steps__badge {
    background: var(--aphm-red-soft);
    border-color: var(--aphm-red);
    color: var(--aphm-red);
}

.aphm-steps__label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--aphm-gray-500);
}

.aphm-steps__item.is-active .aphm-steps__label {
    color: var(--aphm-black);
    font-weight: 600;
}

/* ── Form card ────────────────────────────────────────────────────────── */

.aphm-form-card {
    background: var(--aphm-white);
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: var(--aphm-radius-lg);
    box-shadow: var(--aphm-shadow-md);
    overflow: hidden;
}

.aphm-form-card__header {
    padding: 1.5rem 1.75rem 0;
}

.aphm-form-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--aphm-black);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.aphm-form-card__subtitle {
    font-size: 0.875rem;
    color: var(--aphm-gray-500);
    margin-bottom: 0;
}

.aphm-form-card__body {
    padding: 1.5rem 1.75rem 1.75rem;
}

.aphm-form-section {
    margin-bottom: 1.75rem;
}

.aphm-form-section:last-child {
    margin-bottom: 0;
}

.aphm-form-section__title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--aphm-gray-500);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--aphm-gray-100);
}

/* ── Form controls ────────────────────────────────────────────────────── */

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--aphm-gray-700);
    margin-bottom: 0.375rem;
}

.form-control,
.form-select {
    border-color: var(--aphm-gray-300);
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--aphm-red);
    box-shadow: 0 0 0 3px rgba(142, 25, 36, 0.12);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

/* ── Choice cards (checkbox / radio) ──────────────────────────────────── */

.aphm-choices {
    display: grid;
    gap: 0.625rem;
}

.aphm-choice {
    position: relative;
}

.aphm-choice__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.aphm-choice__label {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    background: var(--aphm-white);
    border: 1.5px solid var(--aphm-gray-300);
    border-radius: var(--aphm-radius);
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--aphm-gray-700);
    line-height: 1.45;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    margin-bottom: 0;
}

.aphm-choice__label:hover {
    border-color: rgba(142, 25, 36, 0.4);
    background: #fefefe;
}

.aphm-choice__input:focus-visible + .aphm-choice__label {
    outline: 2px solid var(--aphm-red);
    outline-offset: 2px;
}

.aphm-choice__input:checked + .aphm-choice__label {
    border-color: var(--aphm-red);
    background: var(--aphm-red-soft);
    box-shadow: 0 0 0 1px var(--aphm-red);
}

.aphm-choice__marker {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
    border: 2px solid var(--aphm-gray-300);
    background: var(--aphm-white);
    transition: all 0.15s ease;
}

.aphm-choice__marker--checkbox {
    border-radius: 0.3rem;
}

.aphm-choice__marker--radio {
    border-radius: 999px;
}

.aphm-choice__input:checked + .aphm-choice__label .aphm-choice__marker {
    border-color: var(--aphm-red);
    background: var(--aphm-red);
}

.aphm-choice__input:checked + .aphm-choice__label .aphm-choice__marker--checkbox::after {
    content: "";
    display: block;
    width: 0.35rem;
    height: 0.6rem;
    margin: 0.1rem auto 0;
    border: solid var(--aphm-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.aphm-choice__input:checked + .aphm-choice__label .aphm-choice__marker--radio::after {
    content: "";
    display: block;
    width: 0.45rem;
    height: 0.45rem;
    margin: 0.2rem auto 0;
    border-radius: 999px;
    background: var(--aphm-white);
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    transition: all 0.15s ease;
}

.btn-primary {
    background-color: var(--aphm-red);
    border-color: var(--aphm-red);
    box-shadow: 0 1px 2px rgba(142, 25, 36, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--aphm-red-dark);
    border-color: var(--aphm-red-dark);
    box-shadow: 0 4px 12px rgba(142, 25, 36, 0.25);
}

.btn-outline-secondary {
    border-color: var(--aphm-gray-300);
    color: var(--aphm-gray-700);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: var(--aphm-gray-100);
    border-color: var(--aphm-gray-300);
    color: var(--aphm-black);
}

.aphm-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--aphm-gray-100);
}

/* ── Participant cards ────────────────────────────────────────────────── */

.participant-card {
    background: var(--aphm-white);
    border: 1px solid rgba(17, 24, 39, 0.08) !important;
    border-radius: var(--aphm-radius-lg) !important;
    box-shadow: var(--aphm-shadow-sm);
    overflow: hidden;
}

.participant-card .card-header {
    background: linear-gradient(180deg, var(--aphm-gray-100) 0%, var(--aphm-white) 100%);
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    padding: 1rem 1.25rem;
}

.participant-card .card-header h2 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--aphm-black);
}

.participant-card .card-body {
    padding: 1.25rem;
}

.aphm-participants-intro {
    background: var(--aphm-white);
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: var(--aphm-radius-lg);
    box-shadow: var(--aphm-shadow-sm);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.aphm-participants-intro h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* ── Phone input ────────────────────────────────────────────────────────── */

.aphm-phone-prefix {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--aphm-gray-100);
    min-width: 5.5rem;
    border-color: var(--aphm-gray-300) !important;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--aphm-gray-700);
}

.aphm-phone-prefix__flag {
    font-size: 1rem;
    line-height: 1;
}

.aphm-phone-input .input-group:focus-within {
    border-radius: 0.5rem;
    box-shadow: 0 0 0 3px rgba(142, 25, 36, 0.12);
}

.aphm-phone-input .input-group:focus-within .form-control,
.aphm-phone-input .input-group:focus-within .aphm-phone-prefix {
    border-color: var(--aphm-red);
}

.aphm-phone-national:-webkit-autofill {
    animation-name: aphm-phone-autofill;
    animation-fill-mode: both;
}

@keyframes aphm-phone-autofill {
    from,
    to {
        background: inherit;
    }
}

/* ── Alerts ───────────────────────────────────────────────────────────── */

.alert-danger {
    border-radius: var(--aphm-radius);
    border: 1px solid #fecaca;
    background: #fef2f2;
    font-size: 0.9375rem;
}

/* ── Success / thank you ────────────────────────────────────────────────── */

.aphm-success-icon {
    width: 4rem;
    height: 4rem;
    margin-inline: auto;
    border-radius: 999px;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    box-shadow: 0 0 0 8px rgba(5, 150, 105, 0.08);
}

.aphm-recap {
    max-width: 640px;
    background: var(--aphm-gray-100);
    border-radius: var(--aphm-radius);
    padding: 1.25rem 1.5rem;
}

.aphm-recap dt {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--aphm-gray-500);
}

.aphm-recap dd {
    font-size: 0.9375rem;
    color: var(--aphm-black);
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.aphm-footer {
    margin-top: 2rem;
}

.aphm-footer__inner {
    background: var(--aphm-white);
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: var(--aphm-radius-lg);
    box-shadow: var(--aphm-shadow-sm);
    padding: 1.5rem 1.75rem;
}

.aphm-footer__org {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--aphm-black);
}

.aphm-footer__address {
    font-size: 0.8125rem;
    color: var(--aphm-gray-500);
    line-height: 1.55;
}

.aphm-footer__contact li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
}

.aphm-footer__contact li:last-child {
    margin-bottom: 0;
}

.aphm-footer__contact-label {
    font-weight: 600;
    color: var(--aphm-gray-500);
    min-width: 3.5rem;
}

.aphm-footer__contact a {
    color: var(--aphm-red);
    text-decoration: none;
    font-weight: 500;
}

.aphm-footer__contact a:hover {
    color: var(--aphm-red-dark);
    text-decoration: underline;
}

/* ── Misc ─────────────────────────────────────────────────────────────── */

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

.aphm-consent {
    font-size: 0.8125rem;
    color: var(--aphm-gray-500);
    line-height: 1.55;
    padding: 0.875rem 1rem;
    background: var(--aphm-gray-100);
    border-radius: var(--aphm-radius);
}

.aphm-participant-count-wrap {
    background: var(--aphm-red-soft);
    border: 1px solid rgba(142, 25, 36, 0.15);
    border-radius: var(--aphm-radius);
    padding: 1.125rem 1.25rem;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 767.98px) {
    .aphm-event-header__hero {
        padding: 1.5rem 1.25rem;
    }

    .aphm-event-header__body {
        padding: 1.25rem;
    }

    .aphm-form-card__header,
    .aphm-form-card__body {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .aphm-steps {
        padding: 1rem;
    }

    .aphm-steps__label {
        font-size: 0.6875rem;
    }

    .aphm-steps__badge {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }

    .aphm-steps__item:not(:last-child)::after {
        top: 0.875rem;
        left: calc(50% + 1.1rem);
        right: calc(-50% + 1.1rem);
    }

    .aphm-form-actions {
        flex-direction: column-reverse;
    }

    .aphm-form-actions .btn {
        width: 100%;
    }

    .aphm-footer__contact {
        margin-top: 1rem;
    }
}
