﻿@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: #eefaff;
    overflow-x: hidden;
}

.signup-page {
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background-image: url("/images/home/background7.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.top-content {
    width: 800px;
    position: absolute;
    top: 2%;
    left: 50%;
    margin-left: -400px;
    text-align: center;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 13px;
    border: 1px solid #f8b5dc;
    border-radius: 20px;
    background: white;
    color: #f21b91;
    font-size: 12px;
    font-weight: 700;
    position: relative;
    top: -6px;
}

.welcome-badge span {
    font-size: 13px;
}

.top-content h1 {
    margin-top: -3px;
    color: #087fd0;
    font-size: 37px;
    line-height: 1;
    font-weight: 800;
}

.top-content h1 span {
    display: block;
}

.top-content h1 strong {
    display: block;
    color: #f21b91;
}

.subtitle {
    margin-top: 2px;
    color: #4da9e9;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
}

/* Address group — full width */
.address-group {
    width: 100%;
    margin: 12px 0 6px;
}

.address-group label img {
    width: 21px;
    height: 21px;
    object-fit: contain;
}

.signup-card {
    width: 620px;
    position: absolute;
    top: 160px;
    left: 50%;
    margin-left: -310px;
    padding: 10px 22px 18px;
    background: white;
    border: 1px solid #b9e1f3;
    border-radius: 18px;
    box-shadow: 0 8px 30px #d2edf8;
    z-index: 2;
    max-width: calc(100% - 32px);
}

.clinic-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 1px;
}

.clinic-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.clinic-name {
    text-align: center;
    line-height: 1;
    margin-left: -10px;
}

.clinic-name strong {
    display: block;
    color: #087fd0;
    font-size: 17px;
    font-weight: 800;
}

.clinic-name b {
    display: block;
    color: #f21b91;
    font-size: 15px;
    font-weight: 800;
    margin-top: 2px;
}

.clinic-name span {
    display: block;
    color: #087fd0;
    font-size: 8px;
    font-weight: 600;
    margin-top: 3px;
}

.signup-title-image {
    display: block;
    width: 150px;
    height: 55px;
    object-fit: contain;
    margin: 1px auto 2px;
}

.input-group {
    width: 100%;
    margin-top: 5px;
}

.input-group select {
    width: 100%;
    height: 30px;
    padding: 0 12px;
    border: 1.5px solid #8ed1f4;
    border-radius: 11px;
    outline: none;
    background: white;
    color: #0875c9;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 11px;
    cursor: pointer;
}

.input-group select:focus {
    border-color: #087fd0;
}

.input-group select:invalid {
    color: #72afe0;
}

.input-group select option {
    color: #0875c9;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 11px;
}

.name-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.name-row .input-group {
    flex: 1 1 calc(25% - 8px);
    min-width: 110px;
}

/* Birthdate needs more room than a plain text field because it holds 3 dropdowns */
.name-row .input-group.birthdate-group {
    flex: 1 1 calc(50% - 8px);
    min-width: 200px;
}

.second-row {
    display: flex;
    gap: 10px;
}

.second-row .input-group {
    width: 50%;
}

.full-input {
    width: 100%;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 3px;
    color: #087fd0;
    font-size: 12px;
    font-weight: 600;
}

.input-group label img {
    width: 21px;
    height: 21px;
    object-fit: contain;
}

.input-group input {
    width: 100%;
    height: 30px;
    padding: 0 12px;
    border: 1.5px solid #8ed1f4;
    border-radius: 11px;
    outline: none;
    background: white;
    color: #0875c9;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 11px;
}

.input-group input::placeholder {
    color: #72afe0;
}

.input-group input:focus {
    border-color: #087fd0;
}

.password-box {
    width: 100%;
    position: relative;
}

.password-box input {
    padding-right: 50px;
}

.password-box button {
    position: absolute;
    right: 10px;
    top: 4px;
    height: 22px;
    padding: 0 5px;
    border: none;
    background: white;
    color: #087fd0;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 11px;
    cursor: pointer;
}

.signup-submit {
    width: 100%;
    height: 37px;
    margin-top: 8px;
    border: none;
    border-radius: 22px;
    background: linear-gradient(90deg, #087fd0, #f21b91);
    color: white;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.login-text {
    margin-top: 7px;
    text-align: center;
    color: #087fd0;
    font-size: 12px;
    font-weight: 500;
}

.login-text a {
    color: #087fd0;
    font-weight: 700;
    text-decoration: underline;
}

.health-decoration {
    position: absolute;
    left: 10%;
    top: 26%;
    width: 185px;
    height: auto;
}

.features {
    position: absolute;
    right: 3%;
    top: 34%;
    width: 310px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.feature img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.feature-text h3 {
    margin-bottom: 0;
    color: #087fd0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feature-text h3::before {
    content: "•";
    color: #f21b91;
    font-size: 14px;
    line-height: 1;
}

.feature-text p {
    color: #087fd0;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 500;
}

.hassle-decoration {
    position: absolute;
    right: 4%;
    bottom: 9%;
    width: 220px;
    height: auto;
}

@media (max-width: 1200px) {

    .top-content {
        width: 700px;
        margin-left: -350px;
    }

    .top-content h1 {
        font-size: 38px;
    }

    .subtitle {
        font-size: 13px;
    }

    .signup-card {
        width: 90%;
        margin-left: -45%;
        top: 270px;
    }

    .health-decoration {
        left: 6%;
        width: 190px;
    }

    .features {
        right: 3%;
        width: 250px;
    }

    .hassle-decoration {
        right: 2%;
        width: 180px;
    }
}

.label-space {
    width: 21px;
    height: 21px;
    display: block;
}

.last-name-label {
    margin-left: -14px;
}

@media (max-width: 900px) {

    .top-content {
        width: 550px;
        margin-left: -275px;
    }

    .top-content h1 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 11px;
    }

    .signup-card {
        width: 90%;
        margin-left: -45%;
        top: 250px;
        padding: 12px 28px 20px;
    }

    .clinic-logo {
        width: 60px;
        height: 60px;
    }

    .signup-title-image {
        width: 145px;
        height: 52px;
    }

    .health-decoration {
        left: 2%;
        top: 38%;
        width: 150px;
    }

    .features {
        right: 1%;
        top: 39%;
        width: 210px;
    }

    .feature {
        margin-bottom: 18px;
    }

    .feature img {
        width: 50px;
        height: 50px;
    }

    .feature-text h3 {
        font-size: 10px;
    }

    .feature-text p {
        font-size: 8px;
    }

    .hassle-decoration {
        width: 150px;
        bottom: 5%;
    }
}

@media (max-width: 700px) {

    .signup-page {
        min-height: 100vh;
        overflow-y: auto;
    }

    .top-content {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        margin-left: 0;
        padding: 30px 20px 0;
    }

    .top-content h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 10px;
    }

    .signup-card {
        position: relative;
        top: auto;
        left: auto;
        width: 90%;
        margin: 25px auto 40px;
        padding: 14px 20px 20px;
    }

    .name-row {
        display: flex;
        flex-direction: column;
    }

    .name-row .input-group {
        width: 100%;
        flex: 1 1 auto;
    }

    .second-row {
        display: block;
    }

    .second-row .input-group {
        width: 100%;
    }

    .health-decoration,
    .features,
    .hassle-decoration {
        display: none;
    }
}

/* =========================================================
   SIGNUP FORM POLISH + ACCOUNT ID PREVIEW
   ========================================================= */
.account-id-preview-group {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 10px 12px;
    border: 1px solid #d8edf8;
    border-radius: 10px;
    background: #f5fbff;
}

.account-id-preview-group[hidden] {
    display: none !important;
}

.account-id-preview-group p {
    margin: 0;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.account-id-preview-group p strong {
    color: #087fd0;
    font-weight: 800;
}

.account-id-preview-group small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 10px;
    line-height: 1.45;
}

.input-group input,
.input-group select {
    min-width: 0;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #087fd0;
    box-shadow: 0 0 0 3px rgba(8, 127, 208, .10);
}

.signup-submit {
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.signup-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(8, 127, 208, .18);
}

.signup-submit:focus-visible,
.password-box button:focus-visible,
.login-text a:focus-visible {
    outline: 3px solid rgba(8, 127, 208, .35);
    outline-offset: 3px;
}

@media (min-width: 701px) {
    .signup-page {
        min-height: 100vh;
        height: auto;
        overflow-y: auto;
        padding: 0 0 36px;
    }

    .signup-card {
        top: 160px;
        margin-bottom: 36px;
    }

    .name-row,
    .second-row {
        align-items: flex-start;
    }

    .name-row .input-group,
    .second-row .input-group {
        min-width: 0;
    }
}

@media (max-width: 700px) {
    .signup-page {
        padding-bottom: 1px;
    }

    .top-content {
        padding: 26px 18px 0;
    }

    .top-content h1 {
        line-height: 1.15;
    }

    .subtitle br {
        display: none;
    }

    .signup-card {
        width: calc(100% - 28px);
        max-width: 550px;
        margin: 22px auto 30px;
        padding: 16px 18px 20px;
    }

    .name-row {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .name-row .input-group {
        width: 100%;
        flex: 1 1 auto;
    }

    .input-group label {
        font-size: 12px;
    }

    .input-group input,
    .input-group select {
        height: 38px;
        font-size: 12px;
    }

    .password-box button {
        top: 8px;
    }

    .signup-submit {
        height: 42px;
    }
}

@media (max-width: 380px) {
    .top-content h1 {
        font-size: 24px;
    }

    .signup-card {
        padding-right: 14px;
        padding-left: 14px;
    }

    .clinic-logo {
        width: 54px;
        height: 54px;
    }

    .clinic-name strong {
        font-size: 15px;
    }

    .clinic-name b {
        font-size: 13px;
    }
}

/* =========================================================
   Signup validation UI (email availability, password match,
   birthdate dropdowns)
   ========================================================= */
.field-status {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    min-height: 16px;
    line-height: 1.2;
}
.field-status.ok { color: #15803d; }
.field-status.bad { color: #b91c1c; }
.field-status.checking { color: #64748b; }

/* Green / red input states */
.input-group input.input-valid {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
}
.input-group input.input-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .15);
}

/* Birthdate month/day/year dropdown row */
.birthdate-row {
    display: flex;
    gap: 6px;
}
.birthdate-row select {
    flex: 1 1 0;
    min-width: 0;
    height: 30px;
    padding: 0 6px;
    border: 1.5px solid #8ed1f4;
    border-radius: 11px;
    background: #ffffff;
    color: #0875c9;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 11px;
    cursor: pointer;
}
.birthdate-row select:focus {
    border-color: #087fd0;
    outline: none;
}
.birthdate-row select:invalid {
    color: #72afe0;
}
#birth_year {
    flex: 1.15 1 0;
}

/* =========================================================
   MEASUREMENT ROW (Height / Weight at signup)
   ========================================================= */
.measurement-row {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.measurement-row .input-group {
    flex: 1 1 0;
    min-width: 0;
    margin-top: 5px;
}

.optional-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #f1f9ff;
    border: 1px solid #d6edfb;
    color: #72afe0;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

@media (max-width: 700px) {
    .measurement-row {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
}
