@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

* {
  box-sizing: border-box;
}
body {
  /* font-family: "Edu QLD Hand", cursive; */
  font-family: "Roboto", sans-serif;
  background-color: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  font-size: 16px;
}
.form-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 100%;
  /* max-width: 600px; */
}
.form-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 0px; /* Default gap between form-groups in a row */
}
.form-group {
  flex: 1;
}

/* Styling for the combined mobile/country code field */
.form-group.form-group-combined-mobile {
  flex: 1; /* Make this group take available space */
  display: flex; /* Use flexbox to align code and number */
  gap: 10px; /* No gap between country code and mobile input */
  border-bottom: 1px solid #666; /* Apply border to the container */
  border-radius: 0; /* Ensure sharp corners for the combined look */
  align-items: center; /* Vertically align content */
  padding-bottom: 0; /* Remove padding that interferes with bottom border */
}

.form-group.form-group-combined-mobile .dropdown-selected {
  /* font-size: 14px; */
  /* max-width: 65px; */
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.form-group.form-group-combined-mobile:focus-within {
  border-bottom-color: #666; /* Highlight combined field on focus */
}

.form-group.form-group-combined-mobile .country-code-select {
  flex: 0 0 80px; /* Fixed width for country code dropdown */
  min-width: 48px; /* Ensure it doesn't get too small */
  border: none; /* Remove individual border */
  border-right: 0px solid #666; /* Add separator border */
  border-radius: 0; /* No rounded corners */
  padding-right: 5px; /* Adjust padding if needed */
  background-position: right 5px center; /* Move arrow slightly left */
  /* max-width: 48px; */
}

.form-group.form-group-combined-mobile .mobile-number-input {
  flex: 1; /* Mobile number input takes remaining space */
  border: none; /* Remove individual border */
  border-radius: 0; /* No rounded corners */
  padding-left: 10px; /* Add padding after country code */
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 0px;
  border: none;
  border-bottom: 1px solid #666; /* Default border for other fields */
  outline: none;
  font-size: 1.1rem;
  box-sizing: border-box;
  background-color: transparent;
  font-family: "Roboto", sans-serif;
}

/* Override default border for combined field inputs */
.form-group-combined-mobile input,
.form-group-combined-mobile select {
  border-bottom: none; /* Remove bottom border from individual elements within combined field */
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: #000;
}

/* Specific overrides for mobile input within combined field */
.form-group-combined-mobile .mobile-number-input:focus {
  border-bottom-color: transparent; /* Handled by parent */
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  border: 1px solid #666;
  border-radius: 0px;
  padding: 14px;
}

/* Styling for placeholders */
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #000;
  font-size: 1.1rem;
  opacity: 1;
}
/* Style for the default disabled select option (Country dropdown) */
.form-group select option[value=""][disabled] {
  color: #000;
  font-size: 1.1rem;
}

/* Hide names in country code dropdown, only show code */
.country-code-select option {
  display: block; /* Ensure options are displayed */
}
.country-code-select option:not([value]):not([disabled]) {
  display: none; /* Hide the initial placeholder option if it's not needed for the combined look */
}
/* Make the selected option only show the code */
.country-code-select option {
  font-size: 1.1rem; /* Ensure consistent font size */
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}
.form-actions button {
  background-color: transparent;
  color: #333;
  padding: 12px 25px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  border: none;
  border-radius: 0px;
  cursor: pointer;
  font-size: 1.4rem;
  min-width: 150px;
  transition: background-color 0.3s ease;
  border: 1px solid #333; /* Add border to the button */
}
.form-actions button:hover {
  background-color: #da3742;
  color: #fff;
  border-color: #da3742;
}

/* Specific styling for all select dropdowns */
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23555" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  cursor: pointer;
}

/* Adjust arrow position for country code select */
.country-code-select {
  background-position: right 5px center !important; /* Move arrow left for narrower field */
  padding-right: 20px; /* Ensure space for arrow */
}

.checkbox-group:not(:last-child) {
  margin-bottom: 10px; /* Add space between checkbox groups */
}

input::placeholder {
  color: #000;
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 1; /* Ensure full opacity for better visibility */

  /* Add other basic text properties like font-weight, text-decoration, etc. */
}

/* For broader browser compatibility: */
input::-webkit-input-placeholder {
  color: #000;
  font-size: 1.1rem;
  font-weight: 400;
}

input::-moz-placeholder {
  color: #000;
  font-size: 1.1rem;
  font-weight: 400;
}

input:-moz-placeholder {
  color: #000;
  font-size: 1.1rem;
  font-weight: 400;
}

input:-ms-input-placeholder {
  color: #000;
  font-size: 1.1rem;
  font-weight: 400;
}

/* Custom Dropdown Styles */

.custom-dropdown.countryCodeDropdown {
  position: relative;
  width: auto;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
}
.custom-dropdown {
  position: relative;
  width: 100%;
  font-family: "Roboto", sans-serif;
}
.dropdown-selected .dropdown-arrow > svg {
  width: 11px;
  opacity: 0.5;
}
.dropdown-selected {
  width: 100%;
  padding: 14px 0px;
  border: none;
  border-bottom: 1px solid #666;
  font-size: 1.1rem;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
}
.dropdown-arrow {
  margin-left: 10px;
  font-size: 1.1rem;
}
.dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}
.dropdown-panel.active {
  display: block;
}
.dropdown-search {
  width: 100%;
  padding: 10px 8px;
  border: none;
  border-bottom: 1px solid #ccc;
  font-size: 1.1rem;
  outline: none;
  background: #fafafa;
  box-sizing: border-box;
}
.dropdown-list {
  max-height: 220px;
  overflow-y: auto;
}
.dropdown-item {
  padding: 14px 15px;
  cursor: pointer;
  background: #f0f1ee;
  border-bottom: 1px solid #c6beae;
  color: #9d9787;
  transition: background 0.2s;
  font-size: 1.1rem;
}
.dropdown-item:last-child {
  border-bottom: none;
}
.dropdown-item:hover,
.dropdown-item.highlighted {
  background: #9d9787;
  color: #fff;
}
.dropdown-item.selected {
  background: #b0aca1;
  color: #fff;
}
.drop-down-search {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.drop-down-search svg {
  position: absolute;
  right: 10px;
  opacity: 0.4;
}
.dropdown-panel .drop-down-search .dropdown-search {
  border: 1px solid #ddd;
  padding: 10px 32px 10px 10px;
  height: 43px;
}

@media screen and (max-width: 768px) {
  .form-row {
    flex-wrap: wrap;
  }

  .form-group {
    min-width: 267px;
  }
}
