/* ============================================
   CUSTOMER SERVICE CARD INTERACTION — CSS
   Colt Optics /contact-us/
   v2 — 2026-04-06
   ============================================ */

/* Hide the GF section grid (data-id: 2aa4676) — collapses the whole row */
.elementor-element-2aa4676 {
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  padding: 0 !important;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.25s,
              opacity 0.4s ease 0.3s,
              padding 0.4s ease 0.25s;
}
.elementor-element-2aa4676.co-gf-visible {
  max-height: 2000px !important;
  opacity: 1 !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* Also collapse the inner GF wrapper container (data-id: 8aa0bb3) */
.elementor-element-8aa0bb3 {
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
}
.co-gf-visible .elementor-element-8aa0bb3 {
  padding: 20px !important;
}

/* Hide the GF widget itself on load */
.elementor-element-89b6b73 {
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  transition: max-height 0.5s ease, opacity 0.4s ease 0.1s;
}
.co-gf-visible .elementor-element-89b6b73 {
  max-height: 2000px !important;
  opacity: 1 !important;
  overflow: visible !important;
}

/* Card grid transition */
.co-service-grid {
  transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              min-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card base — pointer + hover lift */
.co-service-card {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.35s ease,
              min-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s ease, visibility 0s linear 0s;
}
.co-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 18, 75, 0.4);
}

/* --- Selection made: fade out non-selected cards --- */
.elementor-element-b663cba.selection-made .co-service-card {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.35s;
}

/* --- Collapse the grid itself --- */
.elementor-element-b663cba.selection-made {
  grid-template-rows: auto !important;
  grid-template-columns: 1fr !important;
  min-height: 0 !important;
  height: auto !important;
}

/* --- Selected card: collapse to header bar --- */
.elementor-element-b663cba.selection-made .co-service-card.co-selected {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  visibility: visible;
  grid-column: 1 / -1;
  grid-row: 1;
  min-height: 0 !important;
  max-height: 90px !important;
  height: auto !important;
  padding: 20px 32px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  overflow: hidden;
  cursor: default;
  transition: opacity 0.35s ease, visibility 0s linear 0s,
              max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              min-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.4s ease;
}
.elementor-element-b663cba.selection-made .co-selected:hover {
  transform: none;
  box-shadow: none;
}

/* Hide description and CTA inside collapsed card */
.elementor-element-b663cba.selection-made .co-selected .elementor-widget-text-editor,
.elementor-element-b663cba.selection-made .co-selected .co-card-desc,
.elementor-element-b663cba.selection-made .co-selected .co-card-cta {
  display: none !important;
}

/* Keep icon and heading visible, inline */
.elementor-element-b663cba.selection-made .co-selected .elementor-widget-heading {
  margin: 0;
}
.elementor-element-b663cba.selection-made .co-selected .elementor-widget-icon {
  margin: 0 16px 0 0;
  flex-shrink: 0;
}

/* === Change Button — matches nav CTA ghost variant === */
.co-change-btn,
.co-change-btn:link,
.co-change-btn:visited {
  display: none !important;
  margin-left: auto;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  color: #fff !important;
  font-family: "Oxanium", sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 22px;
  border-radius: 5px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
  position: relative;
  z-index: 10;
}
.co-change-btn:hover,
.co-change-btn:focus,
.co-change-btn:active {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  color: #fff !important;
  outline: none;
}
.co-selected .co-change-btn {
  display: inline-flex !important;
}

/* === Hide GF page 1 (hidden field page) — always === */
#gform_page_3_1 {
  display: none !important;
}

/* ============================================
   GRAVITY FORMS BRANDED STYLING
   Form ID: 3
   ============================================ */

/* --- Progress Bar --- */
#gform_wrapper_3 .gf_progressbar {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 32px;
}
#gform_wrapper_3 .gf_progressbar_percentage {
  background: linear-gradient(135deg, #00124B, #263D83) !important;
  border-radius: 5px;
  padding: 8px 16px;
  font-family: "Oxanium", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: width 0.4s ease;
}
#gform_wrapper_3 .gf_progressbar_title {
  font-family: "Oxanium", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #00124B;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

/* --- Labels — hide them, placeholders do the work --- */
#gform_wrapper_3 .gfield_label,
#gform_wrapper_3 .gform-field-label {
  font-family: "Oxanium", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #00124B;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}
#gform_wrapper_3 .gfield_description {
  font-size: 13px;
  color: #5a6270;
  margin-top: 4px;
}
#gform_wrapper_3 .gfield_required {
  color: #CC3366;
}

/* --- Text Inputs & Textareas — inherit global dark style from style.css --- */
#gform_wrapper_3 textarea {
  min-height: 120px;
  resize: vertical;
}

/* --- Select Dropdowns — exact match to text inputs from style.css --- */
#gform_wrapper_3 select,
#gform_wrapper_3 select.gfield_select {
  background: rgba(0, 0, 0, .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 20px center !important;
  border: 1px solid white !important;
  border-radius: 5px !important;
  padding: 20px !important;
  font-family: var(--e-global-typography-accent-font-family), Sans-serif !important;
  font-size: inherit !important;
  font-weight: 600 !important;
  color: white !important;
  text-transform: uppercase !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  height: auto !important;
  line-height: normal !important;
  width: 100% !important;
  cursor: pointer;
  box-sizing: border-box;
}

/* --- Field Spacing — match homepage form tightness --- */
#gform_wrapper_3 .gform_fields {
  column-gap: 10px !important;
  row-gap: 10px !important;
}
#gform_wrapper_3 .gfield {
  margin-bottom: 0 !important;
}
#gform_wrapper_3 .gfield--width-half {
  margin-bottom: 0 !important;
}

/* --- Next / Previous / Submit Buttons --- */
#gform_wrapper_3 .gform_next_button,
#gform_wrapper_3 .gform_previous_button,
#gform_wrapper_3 .gform_button[type="submit"],
#gform_wrapper_3 input[type="submit"] {
  font-family: "Oxanium", sans-serif !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-radius: 5px !important;
  padding: 14px 32px !important;
  cursor: pointer !important;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease !important;
  line-height: 1 !important;
  height: auto !important;
}

/* Next + Submit — solid navy */
#gform_wrapper_3 .gform_next_button,
#gform_wrapper_3 .gform_button[type="submit"],
#gform_wrapper_3 input[type="submit"] {
  background: #263D83 !important;
  color: #fff !important;
  border: 1px solid #263D83 !important;
}
#gform_wrapper_3 .gform_next_button:hover,
#gform_wrapper_3 .gform_next_button:focus,
#gform_wrapper_3 .gform_next_button:active,
#gform_wrapper_3 .gform_button[type="submit"]:hover,
#gform_wrapper_3 .gform_button[type="submit"]:focus,
#gform_wrapper_3 .gform_button[type="submit"]:active,
#gform_wrapper_3 input[type="submit"]:hover,
#gform_wrapper_3 input[type="submit"]:focus,
#gform_wrapper_3 input[type="submit"]:active {
  background: #00124B !important;
  color: #fff !important;
  border-color: #00124B !important;
  box-shadow: 0 4px 16px rgba(0, 18, 75, 0.3) !important;
  transform: translateY(-1px);
  outline: none !important;
}

/* Previous — ghost/outline variant */
#gform_wrapper_3 .gform_previous_button {
  background: transparent !important;
  color: #263D83 !important;
  border: 1px solid rgba(0, 18, 75, 0.25) !important;
}
#gform_wrapper_3 .gform_previous_button:hover,
#gform_wrapper_3 .gform_previous_button:focus,
#gform_wrapper_3 .gform_previous_button:active {
  background: rgba(0, 18, 75, 0.06) !important;
  color: #263D83 !important;
  border-color: #263D83 !important;
  outline: none !important;
}

/* Button row spacing */
#gform_wrapper_3 .gform_page_footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 18, 75, 0.08);
  display: flex;
  gap: 12px;
  align-items: center;
}

/* --- Validation Errors --- */
#gform_wrapper_3 .gfield_error .gfield_label {
  color: #CC3366 !important;
}
#gform_wrapper_3 .gfield_error input,
#gform_wrapper_3 .gfield_error select,
#gform_wrapper_3 .gfield_error textarea {
  border-color: #CC3366 !important;
  background: rgba(204, 51, 102, 0.08) !important;
}
#gform_wrapper_3 .gfield_error .validation_message {
  color: #CC3366;
  font-size: 12px;
  margin-top: 4px;
}
#gform_wrapper_3 .validation_error {
  background: rgba(204, 51, 102, 0.06);
  border: 1px solid rgba(204, 51, 102, 0.2);
  border-radius: 5px;
  padding: 16px;
  color: #CC3366;
  font-family: "Oxanium", sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

/* --- Form Bottom Padding --- */
#gform_wrapper_3 {
  padding-bottom: 32px;
}

/* --- Confirmation Message --- */
#gform_confirmation_wrapper_3,
#gform_wrapper_3 .gform_confirmation_message {
  font-family: "Oxanium", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #00124B;
  text-align: center;
  padding: 40px 20px;
}

/* === Mobile === */
@media (max-width: 767px) {
  .elementor-element-b663cba.selection-made .co-service-card.co-selected {
    flex-direction: row !important;
    padding: 16px 20px !important;
    max-height: 80px !important;
  }
  .co-change-btn {
    font-size: 11px;
    padding: 6px 14px;
  }
  #gform_wrapper_3 .gform_page_footer {
    flex-direction: column;
  }
  #gform_wrapper_3 .gform_next_button,
  #gform_wrapper_3 .gform_previous_button,
  #gform_wrapper_3 .gform_button[type="submit"],
  #gform_wrapper_3 input[type="submit"] {
    width: 100% !important;
    text-align: center;
  }
}
