/* Base styles for HubSpot CMS integration */

/* Reset HubSpot default styling */
.hs-page-width-normal {
  max-width: none !important;
  padding: 0 !important;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Gabarito', sans-serif;
  font-weight: 400;
  background-color: #fafafa; /* Cream background for entire viewport */
  min-height: 100vh;
}

/* Ensure all body text uses Gabarito normal weight by default */
.body-wrapper {
  font-family: 'Gabarito', sans-serif;
  font-weight: 400;
}

/* Do not override HubSpot DnD layout classes; keep defaults for proper column spacing */

/* HubSpot Rich Text defaults: ensure content matches theme styles without extra wrappers */
.hs-richtext,
.hs-richtext p {
  margin: 0;
}

/* Rich text heading styles for content editors - multiple selectors to ensure coverage */
.hs-richtext h1,
.hs-richtext h2,
.hs-richtext h3,
.hs-richtext h4,
.hs-richtext h5,
.hs-richtext h6,
.hs_cos_wrapper_type_rich_text h1,
.hs_cos_wrapper_type_rich_text h2,
.hs_cos_wrapper_type_rich_text h3,
.hs_cos_wrapper_type_rich_text h4,
.hs_cos_wrapper_type_rich_text h5,
.hs_cos_wrapper_type_rich_text h6,
[data-hs-cos-type="rich_text"] h1,
[data-hs-cos-type="rich_text"] h2,
[data-hs-cos-type="rich_text"] h3,
[data-hs-cos-type="rich_text"] h4,
[data-hs-cos-type="rich_text"] h5,
[data-hs-cos-type="rich_text"] h6 {
  font-family: 'Gabarito', sans-serif;
  font-weight: 600;
  color: inherit;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hs-richtext h1:first-child,
.hs-richtext h2:first-child,
.hs-richtext h3:first-child,
.hs-richtext h4:first-child,
.hs-richtext h5:first-child,
.hs-richtext h6:first-child,
.hs_cos_wrapper_type_rich_text h1:first-child,
.hs_cos_wrapper_type_rich_text h2:first-child,
.hs_cos_wrapper_type_rich_text h3:first-child,
.hs_cos_wrapper_type_rich_text h4:first-child,
.hs_cos_wrapper_type_rich_text h5:first-child,
.hs_cos_wrapper_type_rich_text h6:first-child,
[data-hs-cos-type="rich_text"] h1:first-child,
[data-hs-cos-type="rich_text"] h2:first-child,
[data-hs-cos-type="rich_text"] h3:first-child,
[data-hs-cos-type="rich_text"] h4:first-child,
[data-hs-cos-type="rich_text"] h5:first-child,
[data-hs-cos-type="rich_text"] h6:first-child {
  margin-top: 0;
}

.hs-richtext h1,
.hs_cos_wrapper_type_rich_text h1,
[data-hs-cos-type="rich_text"] h1 { 
  font-size: 2.25rem; 
  font-weight: 700; 
}

.hs-richtext h2,
.hs_cos_wrapper_type_rich_text h2,
[data-hs-cos-type="rich_text"] h2 { 
  font-size: 1.875rem; 
  font-weight: 600; 
}

.hs-richtext h3,
.hs_cos_wrapper_type_rich_text h3,
[data-hs-cos-type="rich_text"] h3 { 
  font-size: 1.5rem; 
  font-weight: 600; 
}

.hs-richtext h4,
.hs_cos_wrapper_type_rich_text h4,
[data-hs-cos-type="rich_text"] h4 { 
  font-size: 1.25rem; 
  font-weight: 600; 
}

.hs-richtext h5,
.hs_cos_wrapper_type_rich_text h5,
[data-hs-cos-type="rich_text"] h5 { 
  font-size: 1.125rem; 
  font-weight: 500; 
}

.hs-richtext h6,
.hs_cos_wrapper_type_rich_text h6,
[data-hs-cos-type="rich_text"] h6 { 
  font-size: 1rem; 
  font-weight: 500; 
}

/* Rich text paragraph styles */
.hs-richtext p,
.hs_cos_wrapper_type_rich_text p,
[data-hs-cos-type="rich_text"] p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.hs-richtext p:last-child,
.hs_cos_wrapper_type_rich_text p:last-child,
[data-hs-cos-type="rich_text"] p:last-child {
  margin-bottom: 0;
}

/* Rich text list styles */
.hs-richtext ul,
.hs-richtext ol,
.hs_cos_wrapper_type_rich_text ul,
.hs_cos_wrapper_type_rich_text ol,
[data-hs-cos-type="rich_text"] ul,
[data-hs-cos-type="rich_text"] ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.hs-richtext ul,
.hs_cos_wrapper_type_rich_text ul,
[data-hs-cos-type="rich_text"] ul {
  list-style-type: disc;
}

.hs-richtext ol,
.hs_cos_wrapper_type_rich_text ol,
[data-hs-cos-type="rich_text"] ol {
  list-style-type: decimal;
}

.hs-richtext li,
.hs_cos_wrapper_type_rich_text li,
[data-hs-cos-type="rich_text"] li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.hs-richtext li:last-child,
.hs_cos_wrapper_type_rich_text li:last-child,
[data-hs-cos-type="rich_text"] li:last-child {
  margin-bottom: 0;
}

/* Rich text link styles */
.hs-richtext a,
.hs_cos_wrapper_type_rich_text a,
[data-hs-cos-type="rich_text"] a {
  color: #e9793b;
  text-decoration: underline;
  transition: color 0.15s ease-in-out;
}

.hs-richtext a:hover,
.hs_cos_wrapper_type_rich_text a:hover,
[data-hs-cos-type="rich_text"] a:hover {
  color: #d1672f;
}

.hs-richtext a:focus,
.hs_cos_wrapper_type_rich_text a:focus,
[data-hs-cos-type="rich_text"] a:focus {
  outline: 2px solid #e9793b;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Rich text emphasis styles */
.hs-richtext strong,
.hs-richtext b,
.hs_cos_wrapper_type_rich_text strong,
.hs_cos_wrapper_type_rich_text b,
[data-hs-cos-type="rich_text"] strong,
[data-hs-cos-type="rich_text"] b {
  font-weight: 600;
}

.hs-richtext em,
.hs-richtext i,
.hs_cos_wrapper_type_rich_text em,
.hs_cos_wrapper_type_rich_text i,
[data-hs-cos-type="rich_text"] em,
[data-hs-cos-type="rich_text"] i {
  font-style: italic;
}

/* Rich text blockquote styles */
.hs-richtext blockquote,
.hs_cos_wrapper_type_rich_text blockquote,
[data-hs-cos-type="rich_text"] blockquote {
  border-left: 4px solid #e9793b;
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #6b7280;
}

/* Accessibility: Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #e9793b;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Focus styles for better accessibility */
*:focus {
  outline: 2px solid #e9793b;
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .text-light-gray {
    color: #000000 !important;
  }

  .border-footer-border {
    border-color: #000000 !important;
  }
}

/* Intentionally rely on Tailwind base for element defaults; no overrides here */

/* Removed unused widow helpers to reduce custom CSS */

/* Consolidated Inline Form Styling */
.inline-form form {
  border: 1px solid var(--form-border-color) !important;
  border-radius: var(--form-border-radius) !important;
  padding: var(--form-padding) !important;
  background-color: var(--form-bg-color) !important;
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  position: relative !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

.inline-form form .hs-form-field {
  margin-bottom: 0 !important;
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
}

/* Hide hidden fields and ensure only visible fields take space */
.inline-form form .hs-form-field[style*='display: none'] {
  display: none !important;
}

/* Ensure visible email field takes full available space */
.inline-form form .hs-form-field:not([style*='display: none']) {
  flex: 1 !important;
  display: flex !important;
}

.inline-form form .hs-form-field .input {
  flex: 1 !important;
  display: flex !important;
  min-width: 0 !important;
}

.inline-form form .hs-input {
  flex: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  border: none !important;
  background: transparent !important;
  padding: 12px 16px !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: var(--form-input-color) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  font-family: 'Gabarito', sans-serif !important;
}

/* Additional override for email input specifically */
.inline-form form input[type='email'].hs-input {
  flex: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.inline-form form .hs-input:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.inline-form form .hs-input::placeholder {
  color: #9ca3af !important;
  font-family: 'Gabarito', sans-serif !important;
}

/* Dark gray placeholder for black theme (footer CTA on yellow background) */
.inline-form--black form .hs-input::placeholder {
  color: #374151 !important;
  font-family: 'Gabarito', sans-serif !important;
}

.inline-form form .hs-submit {
  flex-shrink: 0 !important;
  margin-left: 8px !important;
}

/* Specific targeting for email field to ensure it fills space */
.inline-form form .hs_email.hs-email {
  flex: 1 !important;
  display: flex !important;
  margin-bottom: 0 !important;
}

.inline-form form .hs_email.hs-email .input {
  flex: 1 !important;
  display: flex !important;
}

.inline-form form .hs-button {
  flex-shrink: 0 !important;
  width: auto !important;
  padding: 12px 24px !important;
  background-color: #e9793b !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease-in-out !important;
  margin: 0 !important;
  box-shadow: none !important;
  font-family: 'Gabarito', sans-serif !important;
}

.inline-form form .hs-button:hover {
  background-color: #d1672f !important;
}

.inline-form form label {
  display: none !important;
}

.inline-form form .hs-error-msgs,
.inline-form form .hs-form-field .hs-error-msgs {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  color: var(--form-error-color) !important;
  font-size: 14px !important;
  margin-top: 4px !important;
  background: var(--form-error-bg) !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  z-index: 10 !important;
}

/* Form Theme Variants */
.inline-form--light {
  --form-border-color: #d1d5db;
  --form-border-radius: 12px;
  --form-padding: 4px;
  --form-bg-color: transparent;
  --form-input-color: #6b7280;
  --form-error-color: #dc2626;
  --form-error-bg: rgba(255, 255, 255, 0.9);
}

.inline-form--dark {
  --form-border-color: #6b7280;
  --form-border-radius: 12px;
  --form-padding: 4px;
  --form-bg-color: transparent;
  --form-input-color: #d1d5db;
  --form-error-color: #fca5a5;
  --form-error-bg: rgba(55, 65, 81, 0.9);
}

.inline-form--black {
  --form-border-color: #4c4e51;
  --form-border-radius: 8px;
  --form-padding: 4px;
  --form-bg-color: transparent;
  --form-input-color: #000000;
  --form-error-color: #dc2626;
  --form-error-bg: rgba(0, 0, 0, 0.9);
}
