/* Base styles */
.form-container {
    font-family: 'Roboto', sans-serif;
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.user-page-container {
    font-family: 'Roboto', sans-serif;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 40px 20px;
    box-sizing: border-box;   
}
.form-container h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}
.form-container p {
    font-size: 0.95rem;
    margin-bottom: 15px;
}
.form-container input,
.form-container button {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}
.form-container input {
    border: 1px solid #999;
}
.form-container a {
    font-size: 0.9rem;
    color: #000;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 4px;
}
.form-container button {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 10px 0;
    font-size: 1rem;
    cursor: pointer;
}
.hidden {
    display: none;
}

/* Account page styles */
/* #user-page-container {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    color: #111;
    width: 100%;
    max-width: 1200px;
    margin: 0;
    padding: 30px 0;
} */
/* .account-wrapper {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 300px;
    max-width: 1200px;
    margin: 30px 0;
} */
 .account-wrapper {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    /* justify-content: flex-start; */
     justify-content: space-between;
    gap: 40px; /* Updated for optimal spacing */
    max-width: 1200px;
    margin: 30px 0;
  
}


.account-wrapper > div {
    flex: 1 1 0;
    min-width: 250px;
    text-align: left;
    margin: 0;
}
.account-left {
    text-align: left;
    flex: 1 1 0;
    min-width: 300px;
    padding: 20px;
}
.account-right {
    text-align: left;
    flex: 1 1 0;
    min-width: 250px;
    padding: 20px;
    margin-right: 100px;
}
.account-left h1,
.account-right h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.account-wrapper h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.account-wrapper h2 {
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.account-wrapper p,
.account-wrapper a {
    font-weight: 400;
    font-size: 1rem;
    color: #444;
    margin-bottom: 0.75rem;
}

/* Addresses page */
#addressesPage {
    width: 100%;
    max-width: 600px;
    margin: auto;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
}

#addressesPage h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2rem;
    font-weight: 600;
}

#addressList {
    margin-bottom: 30px;
}

#addressList h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.address-item {
    /* background: #fff; */
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.address-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.address-item.selected {
    border-color: #28a745;
    background: #e8f5e8;
}

.address-item strong {
    display: block;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 8px;
}

.address-item p {
    margin: 0;
    color: #666;
    line-height: 1.5;
    font-size: 0.95rem;
}

.address-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

.address-actions a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 12px;
    border: 1px solid #007bff;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.address-actions a:hover {
    background: #007bff;
    color: #fff;
}

#addressForm, #editAddressForm {
    /* Keep form structure but remove white card look so it visually matches account area */
    background: transparent;
    border: 1px solid rgba(233,238,239,0.6);
    border-radius: 8px;
    padding: 24px;
    box-shadow: none;
    margin-top: 20px;
}

#addressForm h2, #editAddressForm h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

#addressForm input, #editAddressForm input {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

#addressForm input:focus, #editAddressForm input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

#addressForm label, #editAddressForm label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

#addressForm .form-row, #editAddressForm .form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

#addressForm .form-row div, #editAddressForm .form-row div {
    flex: 1;
}

#addressForm button, #editAddressForm button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 12px;
}

#addressForm button[type="submit"], #editAddressForm button[type="submit"] {
    background: #28a745;
    color: #fff;
}

#addressForm button[type="submit"]:hover, #editAddressForm button[type="submit"]:hover {
    background: #218838;
}

#addressForm button[type="button"], #editAddressForm button[type="button"] {
    background: #6c757d;
    color: #fff;
}

#addressForm button[type="button"]:hover, #editAddressForm button[type="button"]:hover {
    background: #545b62;
}

.checkbox-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-row input[type="checkbox"] {
    margin-right: 8px;
}

.checkbox-row label {
    font-weight: 500;
    color: #555;
}

/* Media Queries for responsiveness */
@media only screen and (max-width: 900px) {
    .account-wrapper {
        flex-direction: column;
        gap: 0;
    }
    .account-wrapper > div {
        min-width: 0;
        width: 100%;
        margin-bottom: 20px;
    }
    #accountPage {
        padding: 15px 2%;
        margin-left: 0;
    }
}

@media only screen and (max-width: 600px) {
    .form-container {
        padding: 20px 5px;
        max-width: 95vw;
    }
    .form-container h1 {
        font-size: 1.3rem;
    }
    .account-wrapper h1 {
        font-size: 1.8rem;
    }
    .account-wrapper h2 {
        font-size: 1.1rem;
    }
    #accountPage,
    #addressesPage,
    #addressForm,
    #editAddressForm {
        padding: 10px;
        max-width: 97vw;
    }
    .account-wrapper > div {
        min-width: 0;
        width: 100%;
    }
}

/* Extra small devices */
@media only screen and (max-width: 400px) {
    .form-container,
    #accountPage,
    #addressesPage {
        padding: 5px 1px;
        max-width: 100vw;
    }
    .account-wrapper h1 {
        font-size: 1.2rem;
    }
    .form-container h1 {
        font-size: 1rem;
    }
}

.form-btn-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 8px 0 0 0;
}
.form-btn-row button {
    width: 100%;
    margin: 0;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}
.form-btn-row button[type="button"] {
    background-color: #000;
    color: #fff;
}

/* eye of login */
.password-container {
    position: relative;
    width: 100%;
  }

  .password-container input {
    width: 100%;
    padding-right: 40px; /* space for the icon */
  }

  .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
  }