* {
  box-sizing: border-box;
}

/* Prevent horizontal scroll on mobile */
html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Lato', sans-serif;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  max-width: 100vw;
}

.container-editaccount {
  background-color: white;
  border-radius: 10px;
  padding: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  min-height: 100vh;
}

/* When loaded inside sidebar layout */
.maincontent-sideacc .container-editaccount {
  min-height: 0;
  margin: 0;
  border-radius: 8px;
}

.title-editaccount {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 2.5rem;
}

.profile-info-editaccount {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.profile-user-editaccount {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-img-wrapper-editaccount {
  position: relative;
}

.profile-img-editaccount {
  width: 100px;
  height: 100px;
  border-radius: 9999px;
  object-fit: cover;
}

.edit-icon-bg-editaccount {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 100px;
  height: 100px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.edit-icon-editaccount {
  width: 37px;
  height: 37px;
}

.user-name-editaccount {
  font-weight: bold;
  font-size: 20px;
}

.user-email-editaccount {
  color: #6b7280;
  font-size: 14px;
}

.edit-btn-editaccount {
  background-color: #4182F9;
  color: white;
  border-radius: 8px;
  padding: 8px 24px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.form-grid-editaccount {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Make grid more responsive within sidebar */
.maincontent-sideacc .form-grid-editaccount {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.form-group-editaccount {
  display: flex;
  flex-direction: column;
}

.form-label-editaccount {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 0.5rem;
}

.form-input-editaccount {
  background-color: #F8F8F8;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  border: none;
  color: gray;
  flex: 1;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.input-group-editaccount {
  position: relative;
  display: flex;
  align-items: center;
}

.input-btn-overlay {
  position: absolute;
  right: 10px;
  background-color: #4182F9;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  height: 70%;
}

.phone-wrapper-editaccount {
  display: flex;
  align-items: center;
  background-color: #F8F8F8;
  border-radius: 8px;
  padding: 0 12px;
  height: 46px;
  position: relative;
}

.country-code-editaccount {
  background: transparent;
  border: none;
  font-size: 16px;
  color: gray;
  outline: none;
  width: 70px;
  cursor: text;
  -webkit-appearance: none;
  appearance: none;
}

.separator-editaccount {
  width: 1px;
  height: 60%;
  background-color: #ccc;
  margin: 0 10px;
}

.phone-input-editaccount {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 16px;
  color: gray;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.dropdownas {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100px;
  background-color: #fff;
  border: 1px solid #ccc;
  max-height: 150px;
  overflow-y: auto;
  z-index: 1000;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dropdownas.visible {
  display: block;
}

.dropdown-item {
  padding: 8px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.dropdown-item:hover,
.dropdown-item:active {
  background-color: #f0f0f0;
}

/* Others Section - Hidden on desktop, shown on mobile */
.others-section-editaccount {
  display: none;
}

.others-title-editaccount {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #374151;
}

.others-content-editaccount {
  background-color: white;
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.icon-label-editaccount {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
}

/* Tablet Responsive Styles */
@media (max-width: 1024px) {
  .container-editaccount {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .maincontent-sideacc .container-editaccount {
    margin: 0;
    padding: 1rem;
  }
  
  .form-grid-editaccount {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .maincontent-sideacc .form-grid-editaccount {
    gap: 1rem;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .container-editaccount {
    padding: 1rem;
    margin: 0.5rem;
    border-radius: 8px;
    min-height: unset;
  }

  /* Mobile styles when inside sidebar layout */
  .maincontent-sideacc .container-editaccount {
    margin: 0;
    padding: 0.75rem;
    box-shadow: none;
    background-color: transparent;
  }

  .maincontent-sideacc .form-grid-editaccount {
    gap: 1rem;
  }

  .maincontent-sideacc .phone-wrapper-editaccount {
    min-width: 0;
    width: 100%;
  }

  .title-editaccount {
    font-size: 24px;
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .profile-info-editaccount {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: center;
  }

  .profile-user-editaccount {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .profile-img-editaccount {
    width: 80px;
    height: 80px;
  }

  .edit-icon-bg-editaccount {
    width: 80px;
    height: 80px;
  }

  .edit-icon-editaccount {
    width: 25px;
    height: 25px;
  }

  .user-name-editaccount {
    font-size: 18px;
  }

  .user-email-editaccount {
    font-size: 14px;
  }

  .edit-btn-editaccount {
    padding: 12px 24px;
    font-size: 16px;
    width: 100%;
    max-width: 200px;
    touch-action: manipulation;
  }

  .form-grid-editaccount {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .form-label-editaccount {
    font-size: 16px;
    margin-bottom: 0.5rem;
  }

  .form-input-editaccount {
    padding: 16px;
    font-size: 16px;
    min-height: 48px;
    touch-action: manipulation;
  }

  .phone-wrapper-editaccount {
    height: 56px;
    padding: 0 16px;
  }

  .country-code-editaccount {
    width: 80px;
    font-size: 16px;
    min-height: 40px;
  }

  .phone-input-editaccount {
    font-size: 16px;
    min-height: 40px;
  }

  .dropdownas {
    width: 140px;
    max-height: 140px;
    left: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .dropdown-item {
    padding: 12px;
    font-size: 16px;
  }

  .input-btn-overlay {
    font-size: 14px;
    padding: 8px 16px;
    right: 8px;
  }

  /* Show Others section on mobile */
  .others-section-editaccount {
    display: block;
    margin-top: 2rem;
    padding: 1rem 0;
  }

  .others-title-editaccount {
    font-size: 20px;
    margin-bottom: 1rem;
  }

  .iconwrapper-sideacc {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    touch-action: manipulation;
  }

  .iconwrapper-sideacc:hover,
  .iconwrapper-sideacc:active {
    background-color: #f3f4f6;
  }

  .icon-sideacc {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  /* Prevent zoom on iOS */
  input[type="text"], 
  input[type="email"], 
  input[type="password"],
  input[type="tel"] {
    font-size: 16px !important;
    -webkit-appearance: none;
    appearance: none;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .container-editaccount {
    margin: 0.25rem;
    padding: 0.75rem;
  }

  .maincontent-sideacc .container-editaccount {
    margin: 0;
    padding: 0.5rem;
  }

  .title-editaccount {
    font-size: 20px;
    margin-bottom: 1rem;
  }

  .profile-img-editaccount {
    width: 70px;
    height: 70px;
  }

  .edit-icon-bg-editaccount {
    width: 70px;
    height: 70px;
  }

  .edit-icon-editaccount {
    width: 20px;
    height: 20px;
  }

  .user-name-editaccount {
    font-size: 16px;
  }

  .user-email-editaccount {
    font-size: 13px;
  }

  .form-grid-editaccount {
    gap: 1.25rem;
  }

  .form-label-editaccount {
    font-size: 15px;
  }

  .form-input-editaccount {
    padding: 14px;
  }

  .phone-wrapper-editaccount {
    height: 52px;
    padding: 0 14px;
  }

  .country-code-editaccount {
    width: 70px;
  }

  .dropdownas {
    width: 120px;
    max-height: 120px;
  }

  .dropdown-item {
    padding: 10px;
    font-size: 15px;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .container-editaccount {
    margin: 0.125rem;
    padding: 0.5rem;
  }

  .title-editaccount {
    font-size: 18px;
  }

  .profile-img-editaccount {
    width: 60px;
    height: 60px;
  }

  .edit-icon-bg-editaccount {
    width: 60px;
    height: 60px;
  }

  .edit-icon-editaccount {
    width: 18px;
    height: 18px;
  }

  .form-grid-editaccount {
    gap: 1rem;
  }

  .phone-wrapper-editaccount {
    height: 48px;
    padding: 0 12px;
  }

  .country-code-editaccount {
    width: 60px;
  }
}