/* ============================================================================
   contact.css
   Fresh, clean implementation for the Contact page.
   Fully scoped with `.contact-` prefix to avoid affecting other pages.
   Matches reference screenshot: light blue background, white panel,
   crisp borders, subtle shadows, and a classic professional feel.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   Breadcrumb
   --------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--smw-font-stack);
  font-size: 14px;
  line-height: 1.4;
  color: #5B6478;
  margin: 0 0 20px 0;
  padding: 0;
  box-sizing: border-box;
}

.breadcrumb-home {
  color: #2F5FEE;
  font-weight: 600;
  text-decoration: none;
  transition: color .15s ease;
}

.breadcrumb-home:hover {
  text-decoration: underline;
  color: #1E46C4;
}

.breadcrumb-sep {
  color: #9AA3B5;
  margin: 0 4px;
  font-size: 12px;
}

.breadcrumb-current {
  color: #1B2237;
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Page Heading
   --------------------------------------------------------------------------- */
.contact-header {
  margin-bottom: 24px;
  text-align: center; /* Centered as requested */
}

.contact-title {
  font-family: var(--smw-font-stack);
  font-size: 36px;
  font-weight: 800;
  color: #0e2770;
  line-height: 1.15;
  margin: 0 0 8px 0;
}

.contact-subtitle {
  font-family: var(--smw-font-stack);
  font-size: 18px;
  font-weight: 400;
  color: #0b205f;
  line-height: 1.5;
  margin: 0 0 4px 0;
}

/* ---------------------------------------------------------------------------
   Page Wrapper & Panel (Reduced Height & Width)
   --------------------------------------------------------------------------- */
.contact-page-wrapper {
  width: 100%;
  max-width: 620px; /* Reduced from 720px */
  margin: 0 auto;
  background: oklch(0.95 0.03 264);
  border: 1px solid #cfd9ea;
  border-radius: 4px;
  box-shadow: 1px 1px 3px oklch(75.075% 0.1194 263.698 / 0.938), -1px -1px 3px oklch(75.075% 0.1194 263.698 / 0.938);
  padding: 24px 32px; /* Reduced vertical padding */
  box-sizing: border-box;
  font-family: var(--smw-font-stack);
}

/* ---------------------------------------------------------------------------
   Alerts (Success / Error)
   --------------------------------------------------------------------------- */
.contact-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 4px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
}

.contact-alert svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-alert p {
  margin: 4px 0 0 0;
}

.contact-alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.contact-alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ---------------------------------------------------------------------------
   Form Fields (Tightened Spacing)
   --------------------------------------------------------------------------- */
.contact-field-group {
  margin-bottom: 14px; /* Reduced from 20px */
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-family: var(--smw-font-stack);
  font-size: 14px;
  font-weight: 600;
  color: #1B2237;
  margin-bottom: 4px; /* Reduced from 6px */
  display: block;
}

.contact-label .required {
  color: #dc2626;
  margin-left: 2px;
}

.contact-input,
.contact-textarea,
.contact-select {
  width: 100%;
  font-family: var(--smw-font-stack);
  font-size: 15px;
  color: #1B2237;
  background-color: #ffffff; /* Ensure white background */
  border: 1px solid #cfd9ea;
  border-radius: 3px;
  padding: 8px 12px; /* Slightly tighter padding */
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: #9AA3B5;
}

.contact-input:focus,
.contact-textarea:focus,
.contact-select:focus {
  border-color: #2F5FEE;
  box-shadow: 0 0 0 3px rgba(47, 95, 238, 0.15);
}

/* Textarea specifics */
.contact-textarea {
  resize: vertical;
  min-height: 110px; /* Reduced from 140px */
  line-height: 1.5;
}

/* Select wrapper for custom arrow */
.contact-select-wrapper {
  position: relative;
  width: 100%;
}

.contact-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px; /* Space for arrow */
  cursor: pointer;
}

.contact-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #5B6478;
  display: flex;
  align-items: center;
}

/* ---------------------------------------------------------------------------
   Field Meta (Error messages & Character Counters)
   --------------------------------------------------------------------------- */
.contact-field-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 2px; /* Tighter */
  min-height: 16px;
}

.contact-error-msg {
  font-size: 12px;
  color: #dc2626;
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

.contact-char-count {
  font-size: 12px;
  color: #9AA3B5;
  margin-left: auto; /* Push to the right */
}

.contact-char-count.over-limit {
  color: #dc2626;
  font-weight: 600;
}

/* Error state for fields: ONLY border changes, background remains white */
.contact-field-group.has-error .contact-input,
.contact-field-group.has-error .contact-textarea,
.contact-field-group.has-error .contact-select,
.contact-input.input-error,
.contact-textarea.input-error,
.contact-select.input-error {
  border-color: #dc2626;
  background-color: #ffffff; /* Keep background white */
}

.contact-field-group.has-error .contact-input:focus,
.contact-field-group.has-error .contact-textarea:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ---------------------------------------------------------------------------
   Action Buttons (Tightened Spacing)
   --------------------------------------------------------------------------- */
.contact-actions {
  display: flex;
  gap: 16px;
  margin-top: 20px; /* Reduced from 28px */
  padding-top: 16px; /* Reduced from 20px */
  border-top: 1px solid #E4E9F2;
}

.contact-btn {
  font-family: var(--smw-font-stack);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px; /* Slightly tighter */
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.contact-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Primary Button (Send Message) */
.contact-btn-primary {
  flex: 1;
  background-color: #2F5FEE;
  color: #ffffff;
  border-color: #2F5FEE;
}

.contact-btn-primary:hover:not(:disabled) {
  background-color: #1E46C4;
  border-color: #1E46C4;
}

.contact-btn-primary:active:not(:disabled) {
  background-color: #173a9e;
  border-color: #173a9e;
}

/* Secondary Button (Cancel) */
.contact-btn-secondary {
  flex: 1;
  background-color: #ffffff;
  color: #2F5FEE;
  border-color: #cfd9ea;
}

.contact-btn-secondary:hover {
  background-color: #f4f7fc;
  border-color: #b0c0da;
  color: #1E46C4;
}

/* ---------------------------------------------------------------------------
   Responsive Design
   --------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 768px) {
  .contact-page-wrapper {
    padding: 20px 18px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .contact-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .contact-btn {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .contact-page-wrapper {
    padding: 16px 14px;
  }
  
  .contact-title {
    font-size: 28px;
  }
  
  .contact-subtitle {
    font-size: 16px;
  }
  
  .contact-label {
    font-size: 13px;
  }
  
  .contact-input,
  .contact-textarea,
  .contact-select {
    font-size: 14px;
    padding: 8px 10px;
  }
  
  .contact-textarea {
    min-height: 100px;
  }
}