/* Shared form primitives */
.form {
  width: 100%;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-field {
  width: 100%;
}

.form-label,
.form-legend {
  display: block;
  margin: 0 0 10px;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}

.form-control,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  background: #fff;
  border: 1px solid #f4f4f5;
  color: #334155;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-control::placeholder,
.form-textarea::placeholder {
  color: #a1a1aa;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-control:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.form-select-wrap {
  position: relative;
}

.form-select {
  appearance: none;
  padding-right: 56px;
  color: #71717a;
}

.form-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 20px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.form-field--select {
  position: relative;
}

.form-select-custom {
  width: 100%;
  min-height: 56px;
  padding: 0 56px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #f4f4f5;
  color: #71717a;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-select-custom:focus-visible,
.form-field--select.is-open .form-select-custom {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.form-select-custom:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.form-select-custom__icon {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 18px;
  height: 18px;
  background: url('/images/Icon/input-select-icon.svg') center / contain no-repeat;
  transform: translateY(-50%);
}

.form-select-custom__options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: 240px;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  list-style: none;
}

.form-select-custom__option {
  padding: 12px 20px;
  color: #52525b;
  font-size: 0.9rem;
  line-height: 1.5;
  cursor: pointer;
}

.form-select-custom__option:hover,
.form-select-custom__option.is-active {
  background: #f1f5f9;
}

.form-select-custom__option.is-selected {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.form-field--filter-select {
  position: relative;
}

.form-field--filter-select.is-open .form-select-custom {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-filter-select__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  padding: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.form-filter-select__search {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #334155;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.form-filter-select__search:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-filter-select__options {
  max-height: 220px;
  margin: 8px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.form-filter-select__option {
  padding: 12px 14px;
  color: #52525b;
  font-size: 0.9rem;
  line-height: 1.5;
  cursor: pointer;
}

.form-filter-select__option:hover,
.form-filter-select__option.is-active {
  background: #f1f5f9;
}

.form-filter-select__option.is-selected {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.form-filter-select__empty {
  margin: 12px 0 4px;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}

.form-field--multi-filter {
  position: relative;
}

.form-field--multi-filter.is-open .form-select-custom {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-multi-filter__tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-multi-filter__tag {
  min-height: 32px;
  padding: 6px 10px 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #334155c7;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.25;
}

.form-multi-filter__tag-remove {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.form-multi-filter__tag-remove:hover {
  background: rgba(255, 255, 255, 0.28);
}

.form-multi-filter__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  padding: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.form-multi-filter__options {
  max-height: 220px;
  margin: 8px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.form-multi-filter__option {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #52525b;
  font-size: 0.9rem;
  line-height: 1.5;
  cursor: pointer;
}

.form-multi-filter__option:hover,
.form-multi-filter__option.is-active {
  background: #f1f5f9;
}

.form-multi-filter__option.is-selected {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.form-multi-filter__check {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1px solid #cbd5e1;
  background: #fff;
  position: relative;
}

.form-multi-filter__option.is-selected .form-multi-filter__check {
  background: #2563eb;
  border-color: #2563eb;
}

.form-multi-filter__option.is-selected .form-multi-filter__check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-field--date {
  max-width: 24rem;
}

.form-date {
  position: relative;
  width: 100%;
}

.form-date__input {
  padding-right: 64px;
}

.form-date__divider {
  position: absolute;
  top: 50%;
  right: 52px;
  width: 1px;
  height: 36px;
  background: #f4f4f5;
  transform: translateY(-50%);
  pointer-events: none;
}

.form-date__trigger {
  position: absolute;
  top: 0;
  right: 0;
  width: 52px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.form-date__trigger:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: -3px;
}

.form-date__trigger:disabled {
  cursor: not-allowed;
}

.form-date__icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.form-field--file-upload {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.form-file-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.form-file-upload__button {
  min-width: 220px;
}

.form-file-upload__button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-file-upload__list {
  width: 100%;
  max-width: 38rem;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.form-file-upload__item {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.4;
}

.form-file-upload__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.form-file-upload__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-file-upload__size {
  color: #94a3b8;
  font-size: 0.75rem;
}

.form-file-upload__remove {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #334155c7;
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.form-file-upload__remove:hover {
  background: #334155;
}

.form-textarea {
  min-height: 150px;
  padding-top: 18px;
  resize: vertical;
}

.form-help,
.form-error {
  margin: 8px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.form-help {
  color: #64748b;
}

.form-error {
  color: #dc2626;
}

.form-field.is-required .form-label::after,
.form-field.is-required .form-legend::after {
  content: " *";
  color: #dc2626;
}

.form-field.has-error .form-control,
.form-field.has-error .form-select,
.form-field.has-error .form-textarea,
.form-field.has-error .form-select-custom {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.form-field.has-success .form-control,
.form-field.has-success .form-select,
.form-field.has-success .form-textarea,
.form-field.has-success .form-select-custom {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.form-field.is-disabled {
  opacity: 0.65;
}

.form.is-loading {
  pointer-events: none;
}

.form.is-loading .form-submit {
  opacity: 0.75;
  cursor: wait;
}

.form-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
}

.form-choice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}

.form-radio,
.form-checkbox {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: #2563eb;
  cursor: pointer;
}

.form-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #52525b;
  font-size: 0.85rem;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.form-submit {
  min-height: 48px;
  padding: 12px 24px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: center;
  border: 0;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.form-submit:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.form-submit:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

/* Contact page layout */
.contact-page {
  width: 100%;
}

.contact-section {
  width: 100%;
  max-width: 1700px;
  margin: 0 auto;
  padding: 80px 24px 32px;
  display: grid;
  gap: 48px;
}

.contact-section__content {
  width: 100%;
  max-width: 608px;
  margin: 0 auto;
}

.contact-section__intro {
  margin-bottom: 32px;
  text-align: center;
}

.contact-section__title {
  margin: 0;
  color: #334155;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.25;
}

.contact-section__description {
  max-width: 30rem;
  margin: 20px auto 0;
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
}

.contact-section__aside {
  display: none;
}

.contact-info {
  background: #f1f5f9;
  padding: 32px 24px 48px;
}

.contact-info__inner {
  max-width: 1700px;
  margin: 0 auto;
  display: grid;
  gap: 32px;
}

.contact-info__map {
  width: 100%;
  display: block;
}

.contact-details__title {
  margin: 0 0 10px;
  color: #334155;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.7;
}

.contact-details__address,
.contact-details__link {
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
}

.contact-details__address {
  max-width: 28rem;
  margin: 0 0 20px;
}

.contact-details__list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.contact-details__item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-details__icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.contact-details__link {
  text-decoration: none;
  overflow-wrap: anywhere;
}

.form-confirmation-section {
  width: 100%;
  max-width: 1700px;
  margin: 0 auto;
  padding: 80px 24px 32px;
  display: grid;
  gap: 48px;
}

.form-confirmation-section__content {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  text-align: center;
}

.form-confirmation-section__icon {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.form-confirmation-section__title {
  margin: 0;
  color: #334155;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.25;
}

.form-confirmation-section__text {
  max-width: 28rem;
  margin: 0;
  padding-bottom: 24px;
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
}

.form-confirmation-section__cta {
  text-decoration: none;
}

.form-confirmation-section__aside {
  display: none;
}

@media (min-width: 1024px) {
  .form-actions {
    justify-content: flex-start;
  }

  .contact-section {
    padding-top: 128px;
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    align-items: start;
  }

  .contact-section__content {
    margin: 0;
  }

  .contact-section__intro {
    text-align: left;
  }

  .contact-section__description {
    margin-left: 0;
    margin-right: 0;
  }

  .contact-section__aside {
    display: block;
  }

  .contact-info {
    display: none;
  }

  .form-confirmation-section {
    padding-top: 128px;
    padding-bottom: 144px;
    grid-template-columns:
      minmax(0, var(--form-confirmation-content-width, 40%))
      minmax(0, var(--form-confirmation-aside-width, 60%));
    align-items: start;
  }

  .form-confirmation-section__content {
    margin: 0;
  }

  .form-confirmation-section__aside {
    display: block;
  }
}
