.container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    padding: 100px 0px 0px 0px;
    box-sizing: border-box;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-block: 10px;
    width: 440px;
    min-width: 100px;
    margin: 0px 30px;
}

.form-header {
    padding: 20px 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form__title {
    font-size: 36px;
    font-family: var(--font-base-medium);
    color: var(--emphasis-color);
}

.form__subtitle {
    font-size: 14px;
    color: var(--gray-100);
}

.form__alert {
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 10px 20px;
}

.form__entry {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 4px;
}

.form-entry__label {
    color: var(--black-500);
}

.form-entry__control {
    font-size: 14px;
    padding-inline: 20px;
    height: 50px;
    width: 100%;
    border-radius: 5px;
    border: none;
    /* background-color: #f8f8f8; */
    border: 1px solid #c0c0c0;
    color: black;
    box-sizing: border-box;
    font-family: var(--font-base-regular);
}

.form-entry__control:focus {
    outline: none;
    border: 1px solid #6d6d6d;
}

/* Password field with eye toggle */
.password-field {
    position: relative;
    width: 100%;
}

/* add right padding so the eye doesn't overlap text */
.password-field input.form-entry__control[type="password"],
.password-field input.form-entry__control[type="text"] {
    padding-right: 44px; /* space for eye button */
}

.toggle-pwd {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
}

.toggle-pwd:hover {
    background-color: rgba(0,0,0,0.06);
}

.toggle-pwd .eye-icon {
    fill: #6d6d6d;
}

.toggle-pwd.shown .eye-icon {
    fill: #111111;
}

/* Phone input enhancer */
.phone-input-wrap {
    position: relative;
    display: flex;
    align-items: stretch; /* ensure equal heights */
    width: 100%;
    gap: 0;
}

/* Ensure consistent layout for prefix select + number input across all forms */
.phone-number-entry {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Global styles for the country prefix select */
.prefix {
    flex: 0 0 auto;
    padding-inline: 20px;
    height: 50px;
    max-width: 110px; /* container narrows actual visible area */
    border-radius: 5px 0 0 5px;
    color: black;
    font-size: 14px;
    box-sizing: border-box;
    background-color: var(--primary-color);
    border: none !important;
}

/* Global styles for the phone number input */
.phone-number {
    flex: 1 1 auto;
    height: 50px;
    padding-inline: 20px;
    width: 100%;
    border-radius: 0 5px 5px 0;
    font-size: 14px;
    box-sizing: border-box;
    border: 1px solid #c0c0c0;
    font-family: var(--font-base-regular);
    color: #000000;
}

/* Focus state to match registration */
.prefix:focus,
.phone-number:focus {
    outline: none;
    border: 1px solid #6d6d6d;
}

.phone-number::placeholder {
    color: #9e9e9e;
    opacity: 1; /* Firefox reduces opacity by default */
}
  
/* Vendor prefixes for maximum compatibility */
.phone-number::-webkit-input-placeholder {
    color: #9e9e9e;
}
.phone-number::-moz-placeholder {
    color: #9e9e9e;
    opacity: 1;
}
.phone-number:-ms-input-placeholder {
    color: #9e9e9e;
}
.phone-number:-moz-placeholder {
    color: #9e9e9e;
    opacity: 1;
}

.phone-input-wrap .flag-box {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
}

.phone-input-wrap .dial-prefix {
    position: static;          /* inline inside flex */
    display: flex;
    align-items: center;
    opacity: 0; /* shown by JS once initialized */
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 0 0 0 12px;    /* inner spacing around dial */
    color: #000000;
    font-size: 14px;
    font-family: var(--font-base-regular);
    border: 1px solid #c0c0c0; /* look like part of the input */
    border-right: none;        /* merge with input border */
    box-sizing: border-box;    /* include borders in height */
}

/* Neutralize legacy padding when dial is inline */
.phone-input-wrap .with-dial-prefix {
    padding-left: 4px !important;
}

/* Ensure the phone input merges with dial box */
.phone-input-wrap .phone-number {
    border-left: none;
    border-radius: 0 5px 5px 0;
    box-sizing: border-box;    /* include borders in height */
    background-color: #ffffff; /* match dial-prefix background */
}

/* Focus state: when either element is focused, highlight both as a group */
.phone-input-wrap:focus-within .dial-prefix,
.phone-input-wrap:focus-within .phone-number {
    border-color: #6d6d6d;
}
.phone-input-wrap:focus-within .dial-prefix {
    border-right: none; /* keep merged look on focus */
}
.phone-input-wrap:focus-within .phone-number {
    border-left: none; /* keep merged look on focus */
}

/* Custom country select showing only flag */
.prefix-wrap {
    position: relative;
    display: inline-block;
}

.prefix-wrap select.prefix {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    z-index: 1;
    width: 65px;
    height: 50px;
    padding: 0;
    border: none !important;
    border-radius: 5px 0 0 5px;
    background-color: var(--primary-color);
    /* Hide selected text in the closed control (flag-only look) */
    color: transparent;
    text-indent: -9999px;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    /* White caret for prefix select */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ffffff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 6px;
}

/* Keep dropdown list items readable */
.prefix-wrap select.prefix option {
    color: #000; /* visible in the native dropdown */
}

/* Visible focus state for phone prefix select */
.prefix-wrap select.prefix:focus,
.prefix-wrap select.prefix:focus-visible {
    outline: none;
    /* inner highlight for contrast over blue background */
    box-shadow: 0 0 10px 4px rgba(0, 17, 255, 0.15);
}
.prefix-wrap .flag-display {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
    z-index: 2; /* ensure flag sits above select text */
}
/* caret now provided by global select rule */

/* Consistent dropdown icon for all selects */
select.form-entry__control,
select.form__control,
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #ffffff; /* default white background for all selects */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236d6d6d' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
    padding-right: 34px; /* leave space for caret */
}

/* Override Chrome autofill yellow for phone number input so it matches prefix */
input.phone-number:-webkit-autofill,
input.phone-number:-webkit-autofill:hover,
input.phone-number:-webkit-autofill:focus,
input.phone-number:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
            box-shadow: 0 0 0px 1000px #ffffff inset;
    -webkit-text-fill-color: inherit;
    caret-color: inherit;
    transition: background-color 9999s ease-out 0s;
}
/* Firefox */
input.phone-number:-moz-autofill {
    box-shadow: 0 0 0 1000px #ffffff inset;
    -moz-text-fill-color: inherit;
    caret-color: inherit;
}

.form-entry__phone_number {
    display: flex;
}

.form-action {
    width: 100%;
    padding-block: 20px;
}

.form-action__button {
    width: 100%;
    height: 50px;
    border-radius: 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--font-base-medium);
}

.other-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding-block: 20px;
}

@media screen and (min-width: 1000px) {
    .container {
        padding: 130px 0px 30px 0px;
    }
    
    .form {
        gap: 15px;
    }
    
    .form__title {
        font-size: 28px;
    }
    
    .form__alert {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .form-entry__label {
        font-size: 14px;
        padding: 5px 0px;
    }
    
    .form-entry__control {
        font-size: 14px;
        padding: 15px;
    }

    .form-action {
        padding: 10px 0px;
    }
    
    .form-action__button{
        height: 50px;
        border-radius: 25px;
        background-color: var(--primary-color);
        color: white;
        border: none;
        cursor: pointer;
        font-size: 14px;
        font-family: var(--font-base-medium);
    }
    .other-options {
        font-size: 12px;
        padding: 10px;
    }
}