/* ============================================
   Contact Form Section (Footer)
   ============================================ */

.form__section {
  background-color: var(--color-dark-2, #1a1a2e);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.form__section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(/static/images/noise.png);
  background-position: center center;
  background-repeat: repeat;
  background-size: inherit;
  opacity: 0.04;
  z-index: 1;
}

.form__section > * {
  position: relative;
  z-index: 2;
}

.form__header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 100px;
  margin-bottom: 30px;
}

.form__title {
  color: var(--color-white, #fff);
  margin: 0;
  white-space: nowrap;
}

.form__undertitle {
  color: var(--color-grey, #999);
  font-size: 1.125rem;
}

.contactus__form {
  display: flex;
  flex-direction: column;
}

.form__content-2 {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form__fields {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.form__group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.form__group label {
  color: var(--color-grey, #999);
  margin-bottom: 5px;
  font-size: 1.125rem;
}

.form__group input,
.form__group textarea {
  padding: 10px;
  border: none;
  border-bottom: 1px solid var(--color-grey-2, #555);
  color: var(--color-white, #fff);
  font-size: 1rem;
  background-color: transparent;
  outline: none;
  font-family: inherit;
}

.form__group textarea {
  resize: none;
  height: 150px;
  border: 1px solid var(--color-grey-2, #555);
}

.form__group label[for="contactMessage"] {
  font-size: 0.875rem;
}

.form__row--two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* Floating Input & Label */
.floating-input {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: none;
  border-bottom: 1px solid var(--color-grey-2, #555);
  color: var(--color-white, #fff);
  background: transparent;
  outline: none;
  font-family: inherit;
}

.floating-input::placeholder {
  color: transparent;
}

.floating-label {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  color: var(--color-grey, #999);
  font-size: 1rem;
  pointer-events: none;
  transition: 0.3s ease all;
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label,
.floating-label.active {
  top: calc(0% - 8px);
  font-size: 0.875rem;
  color: var(--color-white, #fff);
}

.floating-label .c-yellow {
  color: var(--color-yellow, #FFD700);
}

/* Error Messages */
.form-error {
  color: var(--color-yellow, #FFD700);
  font-size: 0.875rem;
  position: absolute;
  bottom: -20px;
  white-space: nowrap;
  display: none;
}

.form-error.active {
  display: block;
}

.form__checkbox .form-error {
  left: 28px;
  bottom: -18px;
  position: relative;
}

/* Form Footer */
.form__footer {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
}

/* Checkbox */
.form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1rem;
  color: var(--color-white, #fff);
  line-height: 1.4;
  position: relative;
  margin-bottom: 8px;
}

.form__checkbox input {
  appearance: none;
  -webkit-appearance: none;
  min-width: 20px;
  height: 20px;
  border: 2px solid var(--color-white, #fff);
  border-radius: 4px;
  background-color: transparent;
  cursor: pointer;
  position: relative;
  margin-top: 2px;
}

.form__checkbox input:checked {
  background-color: transparent;
  border-color: var(--color-white, #fff);
}

.form__checkbox input:checked::before {
  content: "\2713";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  color: var(--color-white, #fff);
  font-weight: bold;
}

.form__checkbox label {
  cursor: pointer;
  font-size: 0.875rem;
}

.form__checkbox label a {
  text-decoration: none;
  color: var(--color-white) !important;
  display: inline;
  border-bottom: 1px solid var(--color-yellow);
  padding: 2px 4px;
  transition: 0.3s ease;
}

.form__checkbox label a:hover {
  background-color: rgba(255, 199, 94, 0.4);
  border-bottom: 1px solid rgba(255, 199, 94, 0.4);
}

/* Submit Button */
.contact__form-btn {
  padding: 12px 50px;
  text-transform: uppercase;
}

/* Custom Country Select */
.custom-select {
  position: relative;
  width: 100%;
  cursor: pointer;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border: none;
  border-bottom: 1px solid var(--color-grey-2, #555);
  color: var(--color-grey, #999);
  background-color: transparent;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-select-trigger svg {
  width: 12px;
  height: 8px;
  transition: transform 0.3s ease;
  color: var(--color-grey, #999);
}

.custom-select.open .custom-select-trigger svg {
  transform: rotate(180deg);
}

.custom-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  background-color: var(--color-white, #fff);
  border-radius: 4px;
  z-index: 10;
  transition: max-height 0.3s ease;
}

.custom-select.open .custom-options {
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-options::-webkit-scrollbar {
  width: 6px;
}

.custom-options::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 4px;
}

.custom-options::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 4px;
}

.custom-options::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

.custom-options {
  scrollbar-width: thin;
  scrollbar-color: #4a4a4a #ffffff;
}

.custom-option {
  padding: 12px 16px;
  color: var(--color-dark, #1a1a2e);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.custom-option:hover {
  background-color: rgba(255, 204, 0, 0.3);
}

.custom-option.selected {
  color: var(--color-blue, #007AFF);
}

.custom-option.selected:hover {
  background-color: rgba(255, 204, 0, 0.3);
  color: var(--color-blue, #007AFF);
}

/* File Upload */
.form__group--file {
  margin-top: -10px;
}

.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px dashed var(--color-grey-2, #555);
  border-radius: 8px;
  color: var(--color-grey, #999);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-upload-label:hover {
  border-color: var(--color-yellow, #FFD700);
  color: var(--color-white, #fff);
}

.file-upload-label svg {
  flex-shrink: 0;
}

.file-upload-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  max-width: fit-content;
}

.file-upload-name {
  color: var(--color-white, #fff);
  font-size: 0.875rem;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-upload-remove {
  background: none;
  border: none;
  color: var(--color-grey, #999);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.file-upload-remove:hover {
  color: #FF3B30;
}

.form__group--file .form-error {
  position: relative;
  bottom: auto;
  margin-top: 6px;
}


/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .form__header-content {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .form__title {
    white-space: normal;
    font-size: 1.75rem;
  }

  .form__row--two-columns {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .form__footer {
    align-items: stretch;
  }

  .contact__form-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .form__title {
    font-size: 1.5rem;
  }

  .form__undertitle {
    font-size: 1rem;
  }

}
