/* ── Register Layout ─────────────────────────────── */
main:has(.reg-wrapper) {
    margin: 0 auto;
    padding: 0;
    max-width: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.reg-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 98px);
    padding: 40px 24px 80px;
    box-sizing: border-box;
}

.reg-card {
    width: 100%;
    max-width: 520px;
    background: var(--wo-white);
    border-radius: 2px;
    overflow: hidden;
    box-shadow:
        0 1px 0 0 var(--wo-gold),
        0 8px 32px -8px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06);
}

.reg-card-accent {
    height: 3px;
    background: var(--wo-gold);
}

.reg-card-body {
    padding: 44px 40px 36px;
}

/* ── Header ──────────────────────────────────────── */
.reg-header {
    margin-bottom: 36px;
}

.reg-header h1 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--wo-gold-dark);
    margin: 0 0 6px;
}

.reg-header p {
    font-size: 22px;
    font-weight: 700;
    color: var(--wo-text);
    margin: 0;
    line-height: 1.25;
}

/* ── Form ────────────────────────────────────────── */
.reg-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.reg-form .form-errors {
    font-size: 13px;
    color: #c83c3c;
    margin-bottom: 16px;
    line-height: 1.5;
}

.reg-form .form-errors ul {
    margin: 0;
    padding: 0 0 0 16px;
}

.reg-field {
    margin-bottom: 20px;
}

.reg-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wo-gray);
    margin-bottom: 8px;
}

.reg-field .form-control,
.reg-field input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--wo-text);
    background: var(--wo-white);
    border: 1px solid var(--wo-border);
    border-radius: 2px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.reg-field .form-control::placeholder,
.reg-field input[type="text"]::placeholder {
    color: var(--wo-gray-light);
}

.reg-field .form-control:focus,
.reg-field input[type="text"]:focus {
    border-color: var(--wo-gold);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.12);
}

.reg-field .field-error {
    font-size: 12px;
    color: #c83c3c;
    margin-top: 6px;
    line-height: 1.4;
}

/* Prevent Safari autocomplete suggestions */
.form-control[autocomplete="off"] {
    -webkit-appearance: none;
    -webkit-text-fill-color: inherit;
}

input[autocomplete="off"]::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    position: absolute;
    right: 0;
}

/* ── Autocomplete Dropdown ───────────────────────── */
.autocomplete {
    position: relative;
    width: 100%;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid var(--wo-border);
    border-top: none;
    z-index: 1000;
    background: var(--wo-white);
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 0 0 2px 2px;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-items div {
    padding: 10px 14px;
    cursor: pointer;
    color: var(--wo-text-muted);
    border-bottom: 1px solid var(--wo-off-white);
    font-size: 14px;
    transition: background 0.15s ease;
}

.autocomplete-items div:hover {
    background: var(--wo-off-white);
    color: var(--wo-text);
}

.autocomplete-items div strong {
    color: var(--wo-text);
    font-weight: 700;
}

.autocomplete-active {
    background: rgba(197, 165, 90, 0.1) !important;
    color: var(--wo-text) !important;
}

/* ── Terms of Service Checkbox ───────────────────── */
.reg-tos {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.reg-tos input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--wo-gold);
    cursor: pointer;
    flex-shrink: 0;
}

.reg-tos label {
    font-size: 13px;
    color: var(--wo-text-muted);
    margin: 0;
    cursor: pointer;
    line-height: 1.4;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
}

.reg-tos a {
    color: var(--wo-gold-dark);
    text-decoration: none;
    border-bottom: 1px solid rgba(168, 137, 62, 0.3);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.reg-tos a:hover {
    color: var(--wo-gold);
    border-color: var(--wo-gold);
}

/* ── Submit Button ───────────────────────────────── */
.reg-submit {
    width: 100%;
    padding: 13px 20px;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wo-dark);
    background: var(--wo-gold);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}

.reg-submit:hover:not(:disabled) {
    background: #d4b46a;
}

.reg-submit:active:not(:disabled) {
    transform: scale(0.985);
}

.reg-submit:focus-visible {
    outline: 2px solid var(--wo-gold);
    outline-offset: 3px;
}

.reg-submit:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── Footer Links ────────────────────────────────── */
.reg-footer-links {
    padding: 20px 40px;
    background: var(--wo-off-white);
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid var(--wo-border);
}

.reg-footer-links a {
    font-size: 13px;
    color: var(--wo-text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.reg-footer-links a:hover {
    color: var(--wo-gold-dark);
}

/* ── TOS Modal ───────────────────────────────────── */
.tos-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.tos-panel {
    background: var(--wo-white);
    max-width: 900px;
    width: 90%;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    border-top: 3px solid var(--wo-gold);
    overflow: hidden;
}

.tos-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--wo-gray);
    line-height: 1;
    transition: color 0.15s ease;
    z-index: 1;
}

.tos-close:hover {
    color: var(--wo-text);
}

.tos-scroll {
    max-height: 60vh;
    overflow-y: auto;
    padding: 30px 24px 0;
}

.tos-footer {
    text-align: right;
    padding: 16px 24px;
    background: var(--wo-off-white);
    border-top: 1px solid var(--wo-border);
}

.tos-agree-btn {
    background: var(--wo-gold);
    color: var(--wo-dark);
    border: none;
    padding: 10px 24px;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.tos-agree-btn:hover {
    background: #d4b46a;
}

.tos-agree-btn:active {
    transform: scale(0.985);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 480px) {
    .reg-wrapper {
        padding: 32px 16px 80px;
    }

    .reg-card-body {
        padding: 32px 24px 28px;
    }

    .reg-footer-links {
        padding: 16px 24px;
    }
}