/* Contact Section */
.contact-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 32px;
  text-align: center;
  color: var(--text-text-default-color);
}

.contact-heading {
  display: grid;
  gap: 16px;
}

.contact-heading .section-title {
  font-size: 30px;
  line-height: 36px;
  margin: 0;
  color: var(--text-text-onbrand-color);
}

.contact-heading .section-subtitle {
  color: var(--text-text-secondary-color);
  margin: 0;
}

.contact-support {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: translateY(50px);
  will-change: transform;
  transition: none;
}

.contact-card .contact-content {
  display: grid;
  gap: 8px;
}

.contact-content h2 {
  margin: 0;
  color: var(--text-text-default-color);
}

.contact-content p {
  margin: 0;
  color: var(--text-text-secondary-2-color);
}

.contact-content span a {
  color: var(--text-text-default-color);
  text-decoration: none;
}

.contact-card .contact-button {
  width: 100%;
  justify-items: center;
}

/* Contact Form */
.contact-form {
  padding: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transform: translateY(90px);
  will-change: transform;
  transition: none;
}

.contact-form .form-header {
  display: grid;
  gap: 16px;
  text-align: center;
}

.contact-form .form-header h1 {
  margin: 0;
  color: var(--text-text-default-color);
}

.contact-form .form-header p {
  margin: 0;
  color: var(--text-text-secondary-color);
}

.contact-form .form-content {
  gap: 24px;
  display: grid;
}

.form-content .hp-field {
  position: absolute;
  top: -9999px;
  left: -9999px;
  opacity: 0;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.form-content .hp-field input {
  visibility: hidden;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row-group {
  gap: 16px;
  display: grid;
}

.form-row label {
  padding-left: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.form-group input,
.form-group textarea {
  background: transparent;
  border: 1px solid var(--color-white-100, #FFFFFF1A);
  border-radius: var(--block-radius-m);
  color: var(--text-text-default-color);
  transition: border-color 0.2s ease;
  padding: 14.5px 16px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--text-text-default-color);
}

.contact-section textarea {
  min-height: 110px;
  resize: vertical;
  font-family: var(--font-family);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  font-family: var(--font-family);
}

.form-group.error input,
.form-group.error textarea {
  border-color: var(--color-danger);
}

.form-group.error .error-message,
.form-attachments.error .error-message {
  display: block;
}

/* Attachments */
.form-attachments {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.attachment-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.error-message {
  display: none;
  color: var(--color-danger);
  padding-left: 16px;
}

.form-attachments label {
  display: flex;
  align-items: center;
  padding-left: 8px;
  gap: 4px;
  color: var(--text-text-default-color);
  cursor: pointer;
}

.form-attachments .attachment-icon {
  height: 16px;
  width: 16px;
}

.form-attachments input[type="file"] {
  display: none;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.file-list li {
  padding: 4px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.file-list button {
  padding: 0;
  display: flex; 
  align-items: center; 
  justify-content: center;
}

.file-list .attachment-cross {
  height: 13px;
  width: 13px;
  display: block;
}

/* attachment items */
.file-list .invalid-file {
  border: 1px solid var(--color-danger);
  box-shadow: none;
}

.file-list button {
  background: transparent;
  border: none;
  color: var(--text-text-default-color);
  cursor: pointer;
}

.file-hint {
  color: var(--text-text-secondary-color);
  margin: 0;
  padding-top: 8px;
}

.form-submit-button button {
  border: unset;
  width: 100%;
}

/* Animations */
.contact-support.visible .contact-card {
  transform: translateY(0);
  transition: transform 0.8s cubic-bezier(.39, .575, .565, 1);
}

.contact-support.visible .contact-card:nth-child(1) { transition-delay: 0.25s; }
.contact-support.visible .contact-card:nth-child(2) { transition-delay: 0.45s; }

.contact-form.visible {
  transform: translateY(0);
  transition: transform 0.8s cubic-bezier(.39, .575, .565, 1) 0.5s;
}

.contact-section .form-wrapper {
  display: grid;
  gap: 32px;
}

.contact-section .feedback {
  padding: 24px;
  text-align: center;
  display: grid;
  gap: 32px;
  color: var(--text-text-default-color);
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.39, 0.575, 0.565, 1);
  pointer-events: none;
}

.contact-section .feedback.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.contact-section .feedback.fade-out {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.feedback .feedback-item {
  display: grid;
  gap: 8px;
}

.feedback-item .feedback-icon {
  font-size: 56px;
  line-height: 1;
}

.feedback-item .feedback-content {
  display: grid;
  gap: 16px;
}

.feedback-item .feedback-content h1 {
  margin: 0;
  color: var(--text-text-onbrand-color);
}

.feedback-item .feedback-content p {
  margin: 0;
  color: var(--text-text-secondary-color);
}

.feedback-content .feedback-support-email {
  text-decoration: none;
  color: var(--text-text-secondary-color);
}

.contact-section .primary-btn {
  width: 100%;
  max-width: var(--btn-width);
}

.form-submit-button {
  justify-items: center;
}

/* Tablet */
@media (min-width: 768px) {
  .contact-support {
    flex-direction: row;
    justify-content: center;
    gap: 32px;
  }

  .contact-card {
    width: 100%;
  }

  .contact-form {
    gap: 32px;
  }

  .row-group {
    display: flex;
    flex-direction: row;
  }

  .form-group {
    gap: 4px;
    flex: 1;
  }

  .form-submit-button button {
    max-width: 332px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .contact-support {
    gap: 32px;
  }

  .contact-section .primary-btn {
    max-width: var(--btn-l-width);
    height: var(--btn-l-height);
    border-radius: var(--btn-l-radius);
  }
}