/* Centre signup door — one Liquid Glass sheet over the login photo.
   Nested cards are transparent; text sits above the material. */

.signup-body {
    font-family: 'Quicksand', sans-serif;
    position: relative;
    background: radial-gradient(ellipse at center, #0a3346 0%, #04101e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px 24px;
    color: var(--lg-ink-dark, #1c2434);
    overflow: hidden;
}

.signup-body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(8, 14, 32, 0.18), rgba(4, 10, 24, 0.32)),
        url('../img/login-bg.jpg?v=3') center/cover no-repeat;
}

.signup-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    transition: max-width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.signup-container.is-wide {
    max-width: 960px;
}

.signup-glass {
    --lg-regular-tint: rgba(255, 255, 255, 0.22);
    --lg-ink: #1c2434;
    --lg-ink-muted: #3d4a5c;
    overflow: visible;
    contain: none;
    padding: 36px 32px 28px;
    width: 100%;
    box-sizing: border-box;
}

.signup-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.signup-card--short {
    padding-bottom: 36px;
}

.signup-header {
    text-align: center;
    margin-bottom: 22px;
}

.is-wide .signup-header {
    margin-bottom: 16px;
}

.signup-title {
    font-size: 2.35rem;
    font-weight: 700;
    color: #1c2434;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.signup-sub {
    margin: 0;
    color: #5a6578;
    font-size: 1.05rem;
    font-weight: 500;
}

.choice-card {
    display: block;
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 16px;
    padding: 22px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.55);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.choice-card:hover,
.choice-card:focus-visible {
    outline: none;
    border-color: rgba(13, 79, 86, 0.35);
    box-shadow: 0 4px 16px rgba(28, 36, 52, 0.08);
}

.choice-card strong {
    display: block;
    font-size: 1.2rem;
    color: #1c2434;
    margin-bottom: 4px;
}

.choice-card span {
    display: block;
    color: #5a6578;
    font-size: 0.98rem;
}

.signup-footer {
    text-align: center;
    margin: 22px 0 0;
    color: #5a6578;
    font-size: 0.95rem;
}

.signup-footer a {
    color: #0d6e78;
    font-weight: 700;
    text-decoration: none;
}

.signup-footer a:hover {
    text-decoration: underline;
}

#centre-form {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "search"
        "photo"
        "map"
        "lower"
        "submit";
    column-gap: 18px;
}

#centre-form .signup-field--search { grid-area: search; }
#centre-form .centre-lower { grid-area: lower; }
#centre-form .signup-submit { grid-area: submit; }

.centre-lower {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 32px;
}

.centre-lower .signup-field {
    margin-bottom: 0;
}

.is-wide #centre-form {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 1fr);
    grid-template-areas:
        "search search"
        "photo  map"
        "lower  lower"
        "submit submit";
    row-gap: 18px;
    column-gap: 22px;
    align-items: start;
}

.is-wide .centre-lower {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 1fr);
    grid-template-areas:
        "name    address"
        "email   phone";
    column-gap: 22px;
    row-gap: 32px;
    align-items: start;
}

.is-wide .field-name { grid-area: name; }
.is-wide .locked-address { grid-area: address; }
.is-wide .field-email { grid-area: email; }
.is-wide .field-phone { grid-area: phone; }

.signup-field {
    position: relative;
    margin-bottom: 14px;
}

.signup-field label,
.signup-label {
    display: block;
    font-weight: 600;
    color: #3d4a5c;
    margin-bottom: 8px;
    font-size: 0.92rem;
}

.signup-field input:not([type="radio"]) {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    background: rgba(255, 255, 255, 0.55);
    color: #1c2434;
    box-sizing: border-box;
}

.signup-field input:not([type="radio"]):focus {
    outline: none;
    border-color: rgba(13, 110, 120, 0.65);
    box-shadow: 0 0 0 3px rgba(13, 110, 120, 0.14);
}

.invite-code-input {
    text-align: center;
    letter-spacing: 0.42em;
    font-size: 1.45rem;
    font-weight: 700;
    text-transform: uppercase;
    padding-right: 0.42em;
}

.typeahead {
    list-style: none;
    margin: 6px 0 0;
    padding: 6px;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 3;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(28, 36, 52, 0.12);
    max-height: 240px;
    overflow-y: auto;
}

.typeahead-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
}

.typeahead-item.is-active,
.typeahead-item:hover {
    background: #e7f3fb;
}

.typeahead-item strong {
    display: block;
    color: #1c2434;
    font-size: 0.98rem;
}

.typeahead-item span {
    display: block;
    color: #5a6578;
    font-size: 0.85rem;
    margin-top: 2px;
}

.typeahead-item--custom span {
    color: #0d4f56;
}

.locked-photo-slot,
.locked-map {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    margin: 0;
    transition:
        max-height 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.65s ease 0.12s;
}

.is-wide .locked-photo-slot,
.is-wide .locked-map {
    max-height: 240px;
    opacity: 1;
    pointer-events: auto;
}

.locked-photo-slot {
    grid-area: photo;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    min-width: 0;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.42), rgba(197, 210, 222, 0.55)),
        #c9d4de;
}

.is-wide .locked-photo-slot {
    height: 240px;
    max-height: 240px;
}

.locked-photo-slot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.locked-photo-credit {
    position: absolute;
    right: 8px;
    bottom: 6px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.locked-photo-credit a {
    color: inherit;
}

.locked-map {
    grid-area: map;
    border-radius: 16px;
    overflow: hidden;
    background: #e8eef3;
}

.is-wide .locked-map {
    height: 240px;
    max-height: 240px;
    min-width: 0;
}

.locked-address {
    min-width: 0;
}

.locked-address .locked-value {
    display: block;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    box-sizing: border-box;
    color: #1c2434;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.375;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.locked-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #3d4a5c;
    margin-bottom: 8px;
}

.locked-value {
    display: block;
    color: #1c2434;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.35;
}

.signup-field input.is-invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.14);
}

.contact-control {
    position: relative;
}

.contact-control > input:not([type="radio"]) {
    padding-right: 48px;
}

.prefer-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: block;
    width: 22px;
    height: 22px;
    margin: 0;
    z-index: 1;
}

.prefer-toggle input {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 2px solid #3d4a5c;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: none;
    cursor: pointer;
}

.prefer-toggle input:checked {
    border-color: #0d4f56;
    background: #ffffff;
    box-shadow: inset 0 0 0 5px #0d4f56;
}

.prefer-toggle input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 120, 0.22);
}

.prefer-toggle input:checked:focus {
    box-shadow:
        inset 0 0 0 5px #0d4f56,
        0 0 0 3px rgba(13, 110, 120, 0.22);
}

.prefer-toggle input:focus-visible {
    outline: 3px solid rgba(13, 110, 120, 0.28);
    outline-offset: 2px;
}

.field-error {
    margin: 8px 0 0;
    color: #9b1c1c;
    font-size: 0.82rem;
    font-weight: 600;
}

.field-error[hidden] {
    display: none !important;
}

.signup-hint {
    margin: 10px 0 0;
    color: #5a6578;
    font-size: 0.82rem;
    line-height: 1.4;
}

.signup-hint[hidden] {
    display: none !important;
}

.signup-submit {
    width: 100%;
    background: #0d4f56;
    color: #ffffff;
    border: 0;
    padding: 14px;
    border-radius: 14px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.02rem;
    cursor: pointer;
    margin-top: 2px;
}

.signup-submit:hover {
    background: #0b4349;
}

.signup-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.signup-body-copy {
    margin: 0;
    color: #3d4a5c;
    font-size: 1.05rem;
    line-height: 1.5;
    text-align: center;
}

.signup-error {
    background: #fdecea;
    border: 1px solid #f5c2c0;
    border-radius: 10px;
    color: #9b1c1c;
    padding: 10px 14px;
    margin-top: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.signup-card[hidden],
.locked-item[hidden],
.typeahead[hidden],
.signup-error[hidden] {
    display: none !important;
}

@media (max-width: 800px) {
    .signup-body {
        overflow-y: auto;
        align-items: flex-start;
    }

    .signup-container.is-wide {
        max-width: 520px;
    }

    .signup-glass {
        padding: 28px 22px 22px;
    }

    .signup-title {
        font-size: 2rem;
    }

    .is-wide #centre-form {
        grid-template-columns: 1fr;
        grid-template-areas:
            "search"
            "photo"
            "map"
            "lower"
            "submit";
    }

    .is-wide .centre-lower {
        grid-template-columns: 1fr;
        grid-template-areas:
            "name"
            "address"
            "email"
            "phone";
        row-gap: 32px;
    }

    .is-wide .locked-photo-slot,
    .is-wide .locked-map {
        height: 180px;
        max-height: 180px;
    }
}
