/* LeadFunnel design tokens — made global so WP admin can see them too */
:root,
.wp-admin {
  --lf-font: "Montserrat";
  --lf-radius: 8px;
  --lf-radius-sm: 6px;
  --lf-space-1: 6px;
  --lf-space-2: 10px;
  --lf-space-3: 14px;
  --lf-space-4: 18px;
  --lf-space-5: 24px;
  --lf-border: 1px solid #D3D8E3;
  --lf-shadow-focus: 0 0 0 3px rgba(0, 115, 170, .15);
  --lf-shadow-soft: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 1px rgba(16, 24, 40, .04);

  --lf-primary: #98012e;
  --lf-primary-dark: #810027;
  --lf-primary-600: #005a87;
  --lf-accent: #98012e;
  --lf-bg: #ffffff;
  --lf-bg-soft: #f7f9fc;
  --lf-text: #1d2d53;
  --lf-muted: #667085;
  --lf-line: #E4E7EC;
}


/* Layout (12-col grid) */
.lf-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--lf-space-1) var(--lf-space-2);
}

.lf-field {
  grid-column: 1 / -1;
  display: block;
  position: relative;
}

.lf-field.lf-half-width   { grid-column: span 6; }
.lf-field.lf-third-width  { grid-column: span 4; }

@media (max-width: 900px) {
  .lf-field.lf-third-width { grid-column: span 6; }
}
@media (max-width: 768px) {
  .lf-field.lf-half-width,
  .lf-field.lf-third-width { grid-column: 1 / -1; }
}

/* Labels */
.lf-label {
  display: block;

  font-weight: 600;
  color: #344054;
  font-size: 14px;
}

/* Inputs */
.lf-input,
.lf-textarea,
.lf-select,.lf-time-select,
.lf-phone-country {
  border: var(--lf-border);
  border-radius: var(--lf-radius);
  padding: 3px;
  background: var(--lf-bg);
  color: #344054;
  transition: box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
 display:inline-block;
}
.lf-input,
.lf-textarea,
.lf-select,
.lf-phone-country {
  width: 100%;
  box-sizing: border-box;

}
.lf-time-label {
     font-weight: 600;
    color: #344054;
    font-size: 14px;   
    }
.lf-time-select {
    margin: 0 7px;
}

.lf-input:focus,
.lf-textarea:focus,
.lf-select:focus,
.lf-phone-country:focus {
  outline: none;
  border-color: var(--lf-primary);
  box-shadow: var(--lf-shadow-focus);
}

.lf-textarea {
  min-height: 110px;
  resize: vertical;
}

/* Select chevron */
.lf-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23667085' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* Phone field */
.lf-phone-field {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--lf-space-2);
  align-items: center;
}
@media (max-width: 520px) {
  .lf-phone-field {
    grid-template-columns: 1fr;
  }
}

/* Calendar & Date/Time blocks */
.lf-calendar-expanded,
.lf-datetime-expanded {
  background: var(--lf-bg);
}

/* Calendar widget */
.lf-calendar-widget {
  background: var(--lf-bg);
  border: var(--lf-border);
  border-radius: var(--lf-radius);
  padding: var(--lf-space-3);
}

.lf-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--lf-space-3);
  padding-inline: var(--lf-space-2);
}

.lf-calendar-month {
  font-size: 18px;
  font-weight: 700;
  color: #1F2937;
}

.lf-calendar-nav {
  background: var(--lf-primary);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: transform .12s ease, background-color .12s ease;
}
.lf-calendar-nav:hover { background: var(--lf-primary-dark); transform: scale(1.06); }

.lf-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}
.lf-calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--lf-muted);
  padding: 8px 0;
}

.lf-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px 2px;
}

.lf-calendar-day, .time-cell {
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--lf-text);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.lf-calendar-day:hover, .time-cell:hover {
  background-color: rgba(152, 1, 46, .08);
  border-color: rgba(152, 1, 46, .2);
}
.lf-calendar-day.today {
    background-color: #f7f0f0;
  color: #111827;
}
.lf-calendar-day.selected {
  background: var(--lf-accent);
  color: #fff;
  border-color: var(--lf-accent);
}
.lf-calendar-day.empty {
  visibility: hidden;
  pointer-events: none;
}
.lf-calendar-day.disabled-past {
  background-color: #f3f4f6 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
}
.lf-calendar-day.disabled-past:hover {
  background-color: #f3f4f6 !important;
  border-color: transparent !important;
}
.lf-calendar-day.disabled-future {

  color: #9ca3af !important;
  cursor: not-allowed !important;
  position: relative;
}
.lf-calendar-day.disabled-future::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(-45deg, transparent 47%, #98012e 48%, #98012e 52%, transparent 53%);
  pointer-events: none;
  z-index: 2;
}
.lf-calendar-day.disabled-future:hover {
  background-color: #f3f4f6 !important;
  border-color: transparent !important;
}
/* HTML/CSS Tooltip */
.lf-calendar-day.lf-tooltip {
  position: relative;
}
.lf-calendar-day.disabled-future.lf-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
    background: var(--lf-primary);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1001;
  pointer-events: none;
}
.lf-calendar-day.disabled-future.lf-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}
/* Ensure red line stays visible on hover */
.lf-calendar-day.disabled-future.lf-tooltip:hover::before {
  z-index: 2;
}
/* Remove generic tooltip arrow - only for disabled-future days */

/* Generic disabled class for backward compatibility */
.lf-calendar-day.disabled {
  background-color: #f3f4f6 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  position: relative;
}
.lf-calendar-day.disabled::before {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  bottom: 2px;
  left: 2px;
  background: linear-gradient(45deg, transparent 45%, #dc2626 47%, #dc2626 53%, transparent 55%);
  pointer-events: none;
}
.lf-calendar-day.disabled:hover {
  background-color: #f3f4f6 !important;
  border-color: transparent !important;
}

/* Always-visible attribute styling */
.lf-field[data-always-visible="true"] input[type="date"],
.lf-field[data-always-visible="true"] input[type="datetime-local"] {
  background: var(--lf-bg-soft);
  border: 2px solid var(--lf-primary);
  border-radius: var(--lf-radius-sm);
}

/* Custom time picker */
/* Equal-height, side-by-side time panels using Flex */
.lf-form .lf-datetime-expanded{
  display: flex !important;
  flex-wrap: nowrap;
  gap: var(--lf-space-4) !important;
  align-items: stretch !important; /* make items equal height */
  box-sizing: border-box;
}

/* Panels grow evenly and can shrink without overflow */
.lf-form .lf-datetime-expanded > .ar_form_timepicker_hours,
.lf-form .lf-datetime-expanded > .ar_form_timepicker_minutes{
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
  display: grid !important;
  gap: 8px !important;
}

/* Hours = 3 columns; Minutes = 2 columns */
.lf-form .ar_form_timepicker_hours{
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.lf-form .ar_form_timepicker_minutes{
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Headings span full width inside each panel */
.lf-form .ar_form_timepicker_hours::before,
.lf-form .ar_form_timepicker_minutes::before{
  grid-column: 1 / -1;
}

/* Stack on small screens */
@media (max-width: 600px){
  .lf-form .lf-datetime-expanded{
    flex-direction: column !important;
  }
}

.ar_form_timepicker_hours,
.ar_form_timepicker_minutes {
  display: grid;
  gap: 8px;
  border: var(--lf-border);
  border-radius: var(--lf-radius);
  padding: var(--lf-space-3);
  background: var(--lf-bg);
}
.ar_form_timepicker_hours  { grid-template-columns: repeat(6, 1fr); }
.ar_form_timepicker_minutes{ grid-template-columns: repeat(6, 1fr); }

.ar_form_timepicker_hours::before,
.ar_form_timepicker_minutes::before {
  content: attr(data-label);
  grid-column: 1 / -1;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 4px;
  font-size: 14px;
}
.ar_form_timepicker_hours::before   { content: "Select Hour:"; }
.ar_form_timepicker_minutes::before { content: "Select Minutes:"; }


.time-cell.selected {
  background: var(--lf-accent);
  color: #fff;
  border-color: var(--lf-accent);
}
.time-cell p { margin: 0; line-height: 1; font-size: 17px; }

/* Radios & Checkboxes */
.lf-radio-label,
.lf-checkbox-label {
  display: block;
  padding-left: 28px;
  margin-bottom: var(--lf-space-2);
  cursor: pointer;
  color: #344054;
  position: relative;
}

.lf-radio,
.lf-checkbox {
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  margin: 0;
}
.lf-radio-label:hover,
.lf-checkbox-label:hover { color: var(--lf-primary); }

/* Submit button */
.lf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--lf-primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--lf-radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s ease, transform .08s ease;
  box-shadow: var(--lf-shadow-soft);
}
.lf-submit:hover   { background: var(--lf-primary-dark); }
.lf-submit:active  { transform: translateY(0); }
.lf-form .lf-field:last-child .lf-submit { margin-top: var(--lf-space-2); }

/* Messages & states */
.lf-message {
  padding: var(--lf-space-3) var(--lf-space-4);
  border-radius: var(--lf-radius-sm);
  margin-bottom: var(--lf-space-4);
  border: 1px solid transparent;
}
.lf-message.success {    grid-column: span 12; background: #d4edda; border-color: #c3e6cb; color: #155724; }
.lf-message.error   {    grid-column: span 12; background: #f8d7da; border-color: #f5c6cb; color: #721c24; }

.lf-field.has-error .lf-input,
.lf-field.has-error .lf-textarea,
.lf-field.has-error .lf-select,
.lf-field.has-error .lf-phone-country {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, .15);
}
.lf-field-error {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 6px;
}

/* Utility: soft groups inside fields */
.lf-field p,
.lf-field div,
.lf-field span { margin: 0 0 var(--lf-space-2) 0; }

.lf-field h1,
.lf-field h2,
.lf-field h3,
.lf-field h4,
.lf-field h5,
.lf-field h6 {
  margin: 0 0 var(--lf-space-3) 0;
  color: #1F2937;
}

/* Fine-tuning calendar inputs inside expanded blocks */
.lf-calendar-expanded input[type="date"] {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--lf-primary);
  border-radius: var(--lf-radius-sm);
  background: var(--lf-bg);
  font-size: 16px;
  color: var(--lf-text);
  font-weight: 600;
}
.lf-calendar-expanded input[type="date"]:focus { box-shadow: var(--lf-shadow-focus); }

/* Native date picker styling to match custom calendar */
.lf-field input[type="date"] {
  position: relative;
}

/* Style the calendar icon */
.lf-field input[type="date"]::-webkit-calendar-picker-indicator {
  color: white;
  cursor: pointer;
  padding: 6px;
  margin-left: 8px;
  transition: background-color .15s ease, transform .12s ease;
}
.lf-field input[type="date"]::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.06);
}

/* Style the date input text */
.lf-field input[type="date"]::-webkit-datetime-edit {
  font-family: var(--lf-font);
  font-weight: 600;
  color: var(--lf-text);
}

/* Style individual date parts */
.lf-field input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  background: transparent;
}
.lf-field input[type="date"]::-webkit-datetime-edit-text {
  color: var(--lf-muted);
  padding: 0 2px;
}
.lf-field input[type="date"]::-webkit-datetime-edit-month-field,
.lf-field input[type="date"]::-webkit-datetime-edit-day-field,
.lf-field input[type="date"]::-webkit-datetime-edit-year-field {
  background: transparent;
  color: var(--lf-text);
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background-color .15s ease;
}
.lf-field input[type="date"]::-webkit-datetime-edit-month-field:focus,
.lf-field input[type="date"]::-webkit-datetime-edit-day-field:focus,
.lf-field input[type="date"]::-webkit-datetime-edit-year-field:focus {
  background: rgba(152, 1, 46, .08);
  outline: none;
}

/* Firefox date picker styling */
.lf-field input[type="date"]::-moz-calendar-picker-indicator {
  background: var(--lf-primary);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  padding: 6px;
  border: none;
  transition: background-color .15s ease, transform .12s ease;
}
.lf-field input[type="date"]::-moz-calendar-picker-indicator:hover {
  background: var(--lf-primary-600);
  transform: scale(1.06);
}

/* Date/Time Row Layout - 1/2-1/4-1/4 */
.lf-datetime-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lf-datetime-date {
    flex: 1 1 50%; /* 1/2 width */
}

.lf-datetime-hour,
.lf-datetime-minute {
    flex: 1 1 25%; /* 1/4 width each */
    text-align: center;
}

.lf-datetime-row[data-expanded="true"] .lf-datetime-date {
    /* When expanded, show custom calendar instead of native input */
    display: none;
}

.lf-datetime-row[data-expanded="true"]::before {
    content: "";
    flex: 1 1 50%;
    /* Space reserved for expanded calendar */
}

/* Mobile responsive for datetime row */
@media (max-width: 768px) {
    .lf-datetime-row {
        flex-direction: column;
        gap: 8px;
    }

    .lf-datetime-date,
    .lf-datetime-hour,
    .lf-datetime-minute {
        flex: 1 1 100%;
    }
}

/* Consent field styles */
.lf-field-consent .lf-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: normal;
  padding-left: 0;
  margin-bottom: 0;
}

.lf-field-consent .lf-consent-label input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
  margin-top: 2px;
  position: static;
  width: auto;
  height: auto;
}

.lf-consent-lightbox {
  color: var(--lf-primary);
  text-decoration: underline;
  cursor: pointer;
}

.lf-consent-lightbox:hover {
  color: var(--lf-primary-600);
}

/* Consent modal styles */
.lf-consent-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

.lf-consent-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.lf-consent-modal-content {
  position: relative;
  background: white;
  margin: 5% auto;
  width: 90%;
  max-width: 600px;
  max-height: 80%;
  border-radius: var(--lf-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.lf-consent-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--lf-line);
  background: var(--lf-bg-soft);
}

.lf-consent-modal-header h3 {
  margin: 0;
  color: var(--lf-text);
  font-size: 18px;
}

.lf-consent-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  font-weight: bold;
  color: var(--lf-muted);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.lf-consent-modal-close:hover {
  background: var(--lf-line);
  color: var(--lf-text);
}

.lf-consent-modal-footer {
  padding: 20px;
  border-top: 1px solid var(--lf-line);
  background: var(--lf-bg-soft);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.lf-consent-accept-btn {
  background: var(--lf-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--lf-radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.lf-consent-accept-btn:hover {
  background: var(--lf-primary-600);
  transform: translateY(-1px);
}

.lf-consent-modal-body {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.6;
}

.lf-consent-modal-body h1,
.lf-consent-modal-body h2,
.lf-consent-modal-body h3,
.lf-consent-modal-body h4,
.lf-consent-modal-body h5,
.lf-consent-modal-body h6 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--lf-text);
}

.lf-consent-modal-body p {
  margin-bottom: 16px;
  color: var(--lf-text);
}

.lf-consent-modal-body ul,
.lf-consent-modal-body ol {
  margin-bottom: 16px;
  padding-left: 20px;
}

.lf-consent-modal-body li {
  margin-bottom: 8px;
}

/* Prevent body scroll when modal is open */
body.lf-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .lf-consent-modal-content {
    margin: 2% auto;
    width: 95%;
    max-height: 90%;
  }

  .lf-consent-modal-header,
  .lf-consent-modal-body {
    padding: 15px;
  }
}

/* Accessibility helpers */
.lf-form :focus-visible { outline: 2px dashed var(--lf-primary); outline-offset: 2px; }

/* Ensure time grid is clickable */
.lf-datetime-expanded, 
.lf-datetime-expanded .ar_form_timepicker_hours,
.lf-datetime-expanded .ar_form_timepicker_minutes,
.lf-datetime-expanded .time-cell {
  pointer-events: auto;
}
