/* ===================================
   Feedback Form Styles
   Primary: rgb(0, 48, 135)
   Secondary: rgb(157, 34, 53)
   Tertiary: rgb(255, 252, 245)
   =================================== */

/* Reset & Base Styles */
.hero-title-only {
  display: flex;
  flex-direction: column;
  padding-top: clamp(4rem, calc(1.431rem + 4.46vw), 10rem);
  padding-right: 3rem;
  align-items: end;
  justify-content: end;
  background-color: var(--color-secondary);
  box-shadow: 0px 2px 10px -2px rgba(157, 34, 53, 0.8);
}
.hero-title-only h1 {
  font-size: clamp(4rem, calc(0.573rem + 5.95vw), 12rem);
  font-style: italic;
  color: rgb(0, 48, 135); /* Primary */
  color: white;
  /* color: gray; */
  text-shadow: 2px 2px 4px rgba(128, 128, 128, 0.8);
}
.hero-title-only p {
  font-size: clamp(1.8rem, calc(1.374rem + 0.74vw), 2.8rem);
}
/* Container */
.form-container {
  margin: 0 auto;
  margin-top: clamp(1rem, calc(-0.716rem + 2.98vw), 5rem);
  margin-left: clamp(1.5rem, calc(-4.715rem + 10.79vw), 16rem);
  margin-right: clamp(1.5rem, calc(-4.715rem + 10.79vw), 16rem);
  margin-bottom: clamp(1.5rem, calc(-4.715rem + 10.79vw), 16rem);
  background: #ffffff;
  color: #444;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 48, 135, 0.2);
  padding: 2.5rem;
  position: relative;
}

/* Headings */
.form-container h2 {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--color-primary); /* Primary */
  text-align: center;
}

h2a {
  color: rgb(0, 48, 135); /* Primary */
  font-size: 2.4rem;
  margin-bottom: 2.4rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgb(157, 34, 53); /* Secondary accent */
}

.form-intro {
  /* text-align: center; */
  color: rgba(0, 48, 135, 0.8);
  color: white;
  margin-bottom: 2rem;
}

/* Form Sections */
.form-section {
  margin-bottom: 2.8rem;
}

.form-section.hidden {
  display: none;
}

/* Form Groups */
.form-group {
  margin-bottom: 0;
}

/* Labels */
label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--color-primary);
}

.required {
  color: rgb(157, 34, 53); /* Secondary for required indicator */
}

.optional {
  color: #999;
  font-weight: normal;
  font-size: 1.4rem;
}

/* Input Fields - Subtle Shading */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1.6rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background-color: rgba(0, 48, 135, 0.02); /* Subtle primary shading */
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgb(0, 48, 135); /* Primary border on focus */
  background-color: rgba(0, 48, 135, 0.05); /* Slightly stronger shading on focus */
  box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.1);
}

/* Select Dropdown */
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  background-size: 1.2rem;
  padding-right: 4rem;
}

/* Textarea */
textarea {
  resize: vertical;
  min-height: 10rem;
}

/* File Input */
input[type="file"] {
  width: 100%;
  padding: 1rem;
  border: 1px dashed #ddd;
  border-radius: 0.4rem;
  background-color: rgba(0, 48, 135, 0.02);
  cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
  padding: 1rem 1.6rem;
  background-color: rgb(0, 48, 135);
  color: white;
  border: none;
  border-radius: 0.4prem;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

input[type="file"]::-webkit-file-upload-button:hover {
  background-color: rgb(0, 38, 108);
}

.file-info {
  display: block;
  font-size: 1.4rem;
  color: #666;
  margin-top: 0.4rem;
}

/* Error Messages */
.error-message {
  display: block;
  color: rgb(157, 34, 53); /* Secondary for errors */
  font-size: 1.4rem;
  margin-top: 0.4rem;
  min-height: 2rem;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: rgb(157, 34, 53);
  background-color: rgba(157, 34, 53, 0.05);
}

/* Form Actions */
.form-actions {
  margin-top: 3.2rem;
  text-align: center;
}

/* Submit Button */
.btn-submit {
  background-color: rgb(157, 34, 53); /* Secondary */
  color: white;
  padding: 1.6rem 4rem;
  font-size: 1.8rem;
  font-weight: 600;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-submit:hover {
  background-color: rgb(137, 24, 43); /* Darker secondary */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(157, 34, 53, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Response Messages */
.response-message {
  margin-top: 2rem;
  padding: 1.6rem;
  border-radius: 0.4rem;
  text-align: center;
  font-weight: 600;
}

.response-message.hidden {
  display: none;
}

.response-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.response-message.error {
  background-color: #f8d7da;
  color: rgb(157, 34, 53);
  border: 1px solid #f5c6cb;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 0.8rem;
  z-index: 1000;
}

.loading-overlay.hidden {
  display: none;
}

.loading-overlay p {
  margin-top: 1.6rem;
  color: rgb(0, 48, 135);
  font-size: 1.8rem;
  font-weight: 600;
}

/* Loading Spinner */
.loading-spinner {
  width: 6rem;
  height: 6rem;
  border: 6px solid rgba(0, 48, 135, 0.2);
  border-top: 6px solid rgb(0, 48, 135);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-container {
    padding: 2.4rem;
  }

  h1 {
    font-size: 2.4rem;
  }

  h2 {
    font-size: 2rem;
  }

  .btn-submit {
    width: 100%;
    padding: 1.6rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.4rem;
  }

  .form-container {
    padding: 1.6rem;
  }
}
