/*
Theme Name: Montagne Child
Theme URI: https://montagne.qodeinteractive.com
Description: A child theme of Montagne
Author: Select Themes
Author URI: https://qodeinteractive.com
Version: 1.0
Text Domain: montagne
Template: montagne
*/

/* Enable Claude Sonnet 4 for all clients */

/* =========================================================
   Core container & grid
   ========================================================= */

.ds-cf {
  background-color: #fff;
  border-radius: 35px;
  padding: 56px 40px;
}

.ds-cf .ds-grid {
  display: grid;
  gap: 24px 16px;
}

/* mobile-first: single column by default */
.ds-cf .ds-col-1,
.ds-cf .ds-col-2,
.ds-cf .ds-col-3,
.ds-cf .ds-col-4,
.ds-cf .ds-col-5,
.ds-cf .ds-col-6 {
  grid-template-columns: 1fr;
}

/* desktop columns & spans */
@media (min-width: 1024px) {
  .ds-cf .ds-col-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-cf .ds-col-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ds-cf .ds-col-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ds-cf .ds-col-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ds-cf .ds-col-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  .ds-cf .ds-span-1 { grid-column: span 1 / span 1; }
  .ds-cf .ds-span-2 { grid-column: span 2 / span 2; }
  .ds-cf .ds-span-3 { grid-column: span 3 / span 3; }
  .ds-cf .ds-span-4 { grid-column: span 4 / span 4; }
  .ds-cf .ds-span-5 { grid-column: span 5 / span 5; }
  .ds-cf .ds-span-6 { grid-column: span 6 / span 6; }
}

/* =========================================================
   Typography
   ========================================================= */

.ds-heading {
  margin: 24px 0 8px;
  color: #000 !important;
  font-family: "Roboto", sans-serif !important;
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
  text-transform: none !important;
}

.ds-subheading {
  margin: 16px 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #000 !important;
}

.ds-text {
  margin: 0 0 8px;
  font-size: 14px;
  opacity: .9;
  color: #000 !important;
}

.ds-info {
  margin: 8px 0 18px;
}
.ds-info * {
  color: #000 !important;
  font-family: Roboto !important;
  font-size: 20px !important;
  font-style: normal !important;
  line-height: 140% !important;
}

/* labels */
.ds-cf label {
  display: block;
  margin-bottom: 6px;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 160%;
}

/* separator */
.ds-sep {
  border: 0;
  border-top: 1px solid #000;
  margin: 40px auto !important;
  max-width: unset !important;
}

/* =========================================================
   Fields
   ========================================================= */

.ds-cf input[type="text"],
.ds-cf input[type="email"],
.ds-cf input[type="tel"],
.ds-cf select,
.ds-cf textarea {
  width: 100%;
  border: 1px solid #E5E5E5;
  color: #111;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  box-shadow: none;
  margin: 0 !important;
  background: #fff;
}

.ds-cf textarea {
  min-height: 160px;
  border-radius: 14px;
}

.ds-cf ::placeholder,
.ds-cf select {
  font-family: Roboto !important;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 160%;
  color: rgba(0, 0, 0, .35) !important;
}

.ds-cf select {
  color: #111 !important;
  background-color: #fff;
}

/* simple checkbox (native look) */
.ds-cf .wpcf7-list-item {
  margin: 8px 0 0;
}

.ds-cf input[type="checkbox"] {
  transform: translateY(1px);
  accent-color: #000;
}

.ds-cf .wpcf7-checkbox label {
  display: flex;
  align-items: start;
  line-height: 1.2;
}

/* =========================================================
   Chip group
   ========================================================= */

.ds-chip-group {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
}

.ds-chip-group .wpcf7-list-item {
  margin: 0;
}

/* CF7 with use_label_element prints <label><input> Text</label> */
.ds-chip-group label {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 14px;
  color: rgba(0, 0, 0, .35);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

/* chip controls wrapper */
.ds-chip-control {
  display: flex !important;
  gap: 20px;
  flex-wrap: wrap;
}

/* hide native input but keep it accessible */
.ds-chip-group input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* active chip */
.ds-chip-group label:has(input:checked) {
  background: #FFD21E;
  border-color: #FFD21E;
  color: #111;
}

/* check mark on active chip (right side) */
.ds-chip-group label:has(input:checked)::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 12px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="14" viewBox="0 0 18 14" fill="none"><path d="M17 1.50012L6 12.5001L1 7.50012" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  vertical-align: middle;
  font-weight: 700;
  margin-left: 6px;
}

/* =========================================================
   Submit button
   ========================================================= */

.ds-cf .wpcf7-submit {
  background: #FFD21E;
  color: #000;
  border: 0;
  padding: 18px 40px;
  border-radius: 18px;
  font-family: Teko, sans-serif;
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  line-height: 100%;
  text-transform: uppercase;
  letter-spacing: .4px;
  cursor: pointer;
  transition: transform .12s ease, filter .15s ease, box-shadow .12s ease;
  box-shadow: 0 2px 0 rgba(0,0,0,.08);
}

.ds-cf .wpcf7-submit .qodef-m-text::after {
  display: none;
}

.ds-cf .wpcf7-submit:hover {
  filter: brightness(.95);
}
.ds-cf .wpcf7-submit:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}

/* theme plugin hover overrides */
.qodef-qi-contact-form-7 button[type=submit]:focus,
.qodef-qi-contact-form-7 button[type=submit]:hover,
.qodef-qi-contact-form-7 input[type=submit]:focus,
.qodef-qi-contact-form-7 input[type=submit]:hover {
  color: #111 !important;
  background-color: #FFD21E !important;
}

/* actions row */
.ds-actions {
  margin-top: 18px;
}

/* =========================================================
   Date-like controls (native look aligned with text inputs)
   ========================================================= */

.ds-cf input[type="date"],
.ds-cf input[type="time"],
.ds-cf input[type="datetime-local"],
.ds-cf input[type="month"],
.ds-cf input[type="week"] {
  width: 100%;
  background: #F7F7F7;
  border: 1px solid #E5E5E5;
  color: #111;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  box-shadow: none;
  color-scheme: light; /* keep native pickers light */
}

/* Make the inner editable text inherit fonts/colors (WebKit) */
.ds-cf input[type="date"]::-webkit-datetime-edit,
.ds-cf input[type="time"]::-webkit-datetime-edit,
.ds-cf input[type="datetime-local"]::-webkit-datetime-edit,
.ds-cf input[type="month"]::-webkit-datetime-edit,
.ds-cf input[type="week"]::-webkit-datetime-edit {
  color: inherit;
  padding: 0;
}

/* Calendar/clock icon tone-down and hover */
.ds-cf input[type="date"]::-webkit-calendar-picker-indicator,
.ds-cf input[type="time"]::-webkit-calendar-picker-indicator,
.ds-cf input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.ds-cf input[type="month"]::-webkit-calendar-picker-indicator,
.ds-cf input[type="week"]::-webkit-calendar-picker-indicator {
  opacity: .45;
  cursor: pointer;
}
.ds-cf input[type="date"]:hover::-webkit-calendar-picker-indicator,
.ds-cf input[type="time"]:hover::-webkit-calendar-picker-indicator,
.ds-cf input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator,
.ds-cf input[type="month"]:hover::-webkit-calendar-picker-indicator,
.ds-cf input[type="week"]:hover::-webkit-calendar-picker-indicator {
  opacity: .75;
}

/* Remove spinners where present */
.ds-cf input[type="time"]::-webkit-inner-spin-button,
.ds-cf input[type="datetime-local"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox: ensure consistent height/alignment */
@-moz-document url-prefix() {
  .ds-cf input[type="date"],
  .ds-cf input[type="time"],
  .ds-cf input[type="datetime-local"],
  .ds-cf input[type="month"],
  .ds-cf input[type="week"] {
    padding-block: 12px; /* FF uses different box model for these controls */
  }
}

/* =========================================================
   Flatpickr overrides
   ========================================================= */

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #FFD21E !important;
  color: #000 !important;
  border-color: #FFD21E !important;
}

.flatpickr-day.inRange {
  background: rgba(255, 210, 30, 0.5) !important;
  color: #000 !important;
}

.flatpickr-day:hover {
  background: rgba(255, 210, 30, 0.7) !important;
  color: #000 !important;
}

.flatpickr-day.today {
  border-color: #FFD21E !important;
}

/* Connector shadow between start and end dates */
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
  -webkit-box-shadow: -10px 0 0 #FFD21E !important;
  box-shadow: -10px 0 0 #FFD21E !important;
}

/* =========================================================
   CF7 repeatable groups
   ========================================================= */

.wpcf7-field-group-add {
  margin-bottom: 40px;
}

.wpcf7-field-group-add,
.wpcf7-field-group-remove {
  all: unset;
  margin: 24px 0;
  color: #000 !important;
  font-family: "Roboto", sans-serif !important;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
  text-transform: none !important;
  background-color: #FFD21E !important;
  display: block;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}

/* =========================================================
   Utilities
   ========================================================= */

.ds-hide { display: none !important; }

/* Visually hide, keep in DOM for CF7 validation */
.ds-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* =========================================================
   Accessibility: keyboard focus (lighter)
   ========================================================= */

/* Generic focus for all form elements: thinner, less intrusive */
.ds-cf a:focus-visible,
.ds-cf button:focus-visible,
.ds-cf [role="button"]:focus-visible,
.ds-cf input:focus-visible,
.ds-cf select:focus-visible,
.ds-cf textarea:focus-visible,
.ds-cf .wpcf7-field-group-add:focus-visible,
.ds-cf .wpcf7-field-group-remove:focus-visible {
  outline: 1px solid #000;
  outline-offset: 2px;
  border-color: #000;
  box-shadow: none;
}

/* Chip focus: thin outline on label even if input is visually hidden */
.ds-chip-group input[type="checkbox"]:focus-visible + span,
.ds-chip-group label:focus-visible,
.ds-chip-group input[type="checkbox"]:focus-visible ~ label,
.ds-chip-group label:has(input:focus-visible) {
  outline: 1px solid #000;
  outline-offset: 2px;
}

/* Submit button: keep it slightly more visible if desired */
.ds-cf .wpcf7-submit:focus-visible,
.qodef-qi-contact-form-7 button[type=submit]:focus-visible,
.qodef-qi-contact-form-7 input[type=submit]:focus-visible {
  outline: 1px solid #000 !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

/* Links inside the form */
.ds-cf a {
  text-underline-offset: 2px;
}
.ds-cf a:focus-visible {
  text-decoration-thickness: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .ds-cf *,
  .ds-chip-group label,
  .ds-cf .wpcf7-submit {
    transition: none !important;
    animation: none !important;
  }
}
