@import url("colors.css");

/* ======================
   Contact Form Container
   ====================== */

.contact-form {
  background: linear-gradient(135deg, var(--bkg2) 0%, var(--pri) 100%);
  padding: 2rem;
  margin: 0 auto 2rem auto;
  border: 2px solid var(--pri);
  box-shadow: 0 4px 16px var(--shadow1);
  transition: all 0.3s ease;
}

.contact-form:hover {
  border-color: var(--priAcc);
  box-shadow: 0 6px 24px var(--shadow2);
}

/* ======================
   Form Inputs
   ====================== */

input[type=text], 
input[type=email], 
select, 
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--pri);
  background-color: var(--bkg2);
  box-sizing: border-box;
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
  resize: vertical;
  font-family: inherit;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

input[type=text]:hover, 
input[type=email]:hover, 
select:hover, 
textarea:hover {
  border-color: var(--priAcc);
}

input[type=text]:focus, 
input[type=email]:focus, 
select:focus, 
textarea:focus {
  outline: none;
  border-color: var(--priAcc);
  background-color: var(--pri);
  box-shadow: 0 0 0 3px rgba(95, 168, 255, 0.2);
}

/* Placeholder styling */
input::placeholder,
textarea::placeholder {
  color: #6b7280;
  opacity: 0.7;
}

/* ======================
   Textarea Specific
   ====================== */

textarea {
  min-height: 150px;
  line-height: 1.6;
}

/* ======================
   Submit Button
   ====================== */

.submit {
  text-align: center;
  margin-top: 1rem;
}

input[type=submit] {
  background: var(--priAcc);
  color: var(--bkg);
  padding: 1.2rem 2.5rem;
  border: 2px solid var(--priAcc);
  cursor: pointer;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow1);
  text-transform: uppercase;
  font-family: inherit;
}

input[type=submit]:hover {
  background: var(--link);
  border-color: var(--link);
  color: var(--bkg);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow2);
}

input[type=submit]:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px var(--shadow1);
}

input[type=submit]:focus {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Form result message spacing */
#form-result {
  margin-top: 1rem;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 500;
}

/* ======================
   Form Field Groups
   ====================== */

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

/* ======================
   Error/Success States
   ====================== */

input.error,
textarea.error {
  border: 2px solid #ef4444;
}

input.success,
textarea.success {
  border: 2px solid #10b981;
  
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: -1rem;
  margin-bottom: 1rem;
  display: block;
}

.success-message {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid #10b981;
  color: #10b981;
  padding: 1rem;
  margin-top: 2rem !important;
  margin-bottom: 1.5rem;
}

/* ======================
   Responsive Design
   ====================== */

@media (max-width: 600px) {
  .contact-form {
    padding: 1.5rem;
  }

  input[type=submit] {
    width: 100%;
    padding: 1rem;
  }
}