/* Slider Track Styling */
.colored-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(to right, #e85555, #ffe59f, #248e31);
  border-radius: 5px;
  outline: none;
  transition: background 0.15s ease-in-out;
}

.colored-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(to right, #e85555, #ffe59f, #248e31);
}

.colored-slider::-moz-range-track {
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(to right, #e85555, #ffe59f, #248e31);
}
/* ensure calendar is above other elements */
.flatpickr-calendar {
  z-index: 999999 !important;
  max-width: 100% !important; /* ensure it never exceeds viewport width */
  box-sizing: border-box;
}

/* if two-months on very small screens, force one month */
@media (max-width: 640px) {
  .flatpickr-months {
    flex-wrap: nowrap;
  }
}
/* Slider Thumb Styling */
.colored-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background-color: #4caf50;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
}

.colored-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background-color: #4caf50;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ffffff;
}

/* Style for Displaying the Slider Value */
.slider-value {
    font-weight: 400;
    color: #000;
    margin-left: 10px;
    font-size: 13px;
}
.form-range::-webkit-slider-thumb {
  margin-top: -8px !important;
  background: #fff !important;
  border: solid 1px #666 !important;
}

form#bbp-search-form {
  display: none;
}

.reversed-slider {
  direction: rtl;
}
span.bbp-author-ip {
  display: none !important;
}
.bbp-template-notice {
    display: none;
}

.refrence-wrp {
    font-size: 73%;
}
/* ===== EDITFORM LAYOUT STYLES - MODERN ACCORDION ===== */
.editform_layout .section-header {
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 0.5rem 0;
  background: #ffffff;
  /* border: 1px solid #e0e0e0; */
  border-radius: 12px;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 10;
}

.editform_layout .section-header:hover {
  border-color: #084d8b;
  box-shadow: 0 4px 16px rgba(8, 77, 139, 0.15);
  transform: translateY(-2px);
}

.editform_layout .section-header h3,
.editform_layout .section-header h4 {
  margin: 0;
  color: #084d8b;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.editform_layout .section-header:hover h3,
.editform_layout .section-header:hover h4 {
  color: #b30d2c;
}

.editform_layout .edit-icon {
  color: #084d8b;
  font-size: 1rem;
  margin-right: 1rem;
  transition: all 0.3s ease;
}

.editform_layout .edit-icon,
.editform_layout .sub-edit-icon {
  transform: rotate(-90deg);
}

.editform_layout .section-header:hover .edit-icon {
  color: #b30d2c;
  transform: scale(1.1) rotate(-90deg);
}

/* Modern Section Content */
.editform_layout .section-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
  padding: 0 1.5rem;
  position: relative;
  z-index: 5;
}

.editform_layout .section-content.active {
  max-height: 10000px;
  opacity: 1;
  transform: translateY(0);
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #fafbfc;
  border-radius: 8px;
  border: 1px solid #e8ecef;
  overflow: visible !important;
  z-index: 20; /* Higher than headers for dropdown overlap */
}

/* Blue Border Titles - Enhanced */
.editform_layout .blue-border {
  border-bottom: 3px solid #084d8b;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.editform_layout .blue-border::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, #b30d2c, #d41134);
  border-radius: 3px;
}

/* Modern Sub-section Headers */
.editform_layout .sub-section-header {
  cursor: pointer;
  padding: 1rem 1.25rem;
  margin: 1rem 0 0.5rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.editform_layout .sub-section-header:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-color: #084d8b;
  transform: translateX(4px);
}

.editform_layout .sub-section-header h5 {
  margin: 0;
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.editform_layout .sub-edit-icon {
  color: #084d8b;
  font-size: 0.9rem;
  margin-right: 0.75rem;
  transition: all 0.3s ease;
}

.editform_layout .sub-section-header:hover .sub-edit-icon {
  color: #b30d2c;
}

/* Modern Sub-section Content */
.editform_layout .sub-section-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
  padding: 0 1.25rem;
  position: relative;
  z-index: 5;
}

.editform_layout .sub-section-content.active {
  max-height: 5000px;
  opacity: 1;
  transform: translateX(0);
  margin: 0.75rem 0 1.5rem 0;
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: visible !important;
  z-index: 20;
}

/* Enhanced Therapy Radio Sections */
.editform_layout .therapy-radio-group {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 1.75rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.5rem;
  position: relative;
}

.editform_layout .therapy-radio-group .form-check {
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.editform_layout .therapy-radio-group .form-check:hover {
  border-color: #084d8b;
  box-shadow: 0 2px 8px rgba(8, 77, 139, 0.1);
}

/* Modern Therapy Sections */
.editform_layout .therapy-section {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 5;
}

.editform_layout .therapy-section.active {
  max-height: 3000px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 1.25rem;
  overflow: visible !important;
  z-index: 20;
}

.editform_layout .therapy-section .card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.editform_layout .therapy-section .card-body {
  padding: 1.75rem;
}

/* Modern Button Styling */
.editform_layout .eisentraphie-btn {
  background: linear-gradient(135deg, #084d8b 0%, #0a5cb0 100%);
  color: white;
  border: none;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 10px;
  border: unset !important;

  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(8, 77, 139, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1; /* Low z-index so dropdowns can appear above if needed */
}

.editform_layout .eisentraphie-btn:hover {
  background: linear-gradient(135deg, #b30d2c 0%, #d41134 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(179, 13, 44, 0.4);
}

.editform_layout .eisentraphie-btn:active {
  transform: translateY(-1px);
}

/* Enhanced Loading Overlay */
.editform_layout #loadingOverlay {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  z-index: 999999;
}

/* Modern Form Controls */
.editform_layout .form-control,
.editform_layout .form-select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.editform_layout .form-control:focus,
.editform_layout .form-select:focus {
  border-color: #084d8b;
  box-shadow: 0 0 0 3px rgba(8, 77, 139, 0.1);
}

/* Enhanced Slider Styles */
.editform_layout .form-range.colored-slider {
  height: 8px;
  border-radius: 4px;
}

.editform_layout .form-range.colored-slider::-webkit-slider-thumb {
  background: #084d8b;
  border: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.editform_layout .form-range.colored-slider::-moz-range-thumb {
  background: #084d8b;
  border: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Critical: Ensure dropdown visibility */
.editform_layout .section-content.active,
.editform_layout .sub-section-content.active,
.editform_layout .therapy-section.active,
.editform_layout .card,
.editform_layout .card-body {
  overflow: visible !important;
  position: relative;
  z-index: 20;
}

/* Fix for dropdown z-index */
.editform_layout .choices__list--dropdown {
  z-index: 10050 !important;
}

.editform_layout .choices.is-open {
  z-index: 10051 !important;
}

.editform_layout .mb-2 {
  position: relative;
}

/* Reference line enhancements */
.editform_layout .reference-line-container {
  margin-top: 0.5rem;
}

.editform_layout .reference-line {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.editform_layout .value-indicator {
  color: #084d8b;
  font-weight: bold;
  text-shadow: 0 1px 2px white;
}

/* Print styles */
@media print {
  .editform_layout .section-content,
  .editform_layout .sub-section-content,
  .editform_layout .therapy-section {
    max-height: none !important;
    opacity: 1 !important;
    transform: none !important;
    display: block !important;
  }

  .editform_layout .section-header,
  .editform_layout .sub-section-header {
    background: none !important;
    border: 2px solid #000 !important;
  }
}

/* Responsive enhancements */
@media (max-width: 768px) {
  .editform_layout .section-header {
    padding: 1rem 1.25rem;
  }

  .editform_layout .section-header h3 {
    font-size: 1.1rem;
  }

  .editform_layout .section-content.active {
    padding: 1rem;
  }

  .editform_layout .eisentraphie-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}

/* Smooth transitions for all interactive elements */
.editform_layout .section-header,
.editform_layout .sub-section-header,
.editform_layout .therapy-section,
.editform_layout .section-content,
.editform_layout .sub-section-content {
  will-change: transform, opacity, max-height;
}

/* Focus states for accessibility */
.editform_layout .section-header:focus,
.editform_layout .sub-section-header:focus {
  outline: 3px solid rgba(8, 77, 139, 0.3);
  outline-offset: 2px;
}

/* Improve mobile touch scrolling */
.timeline-scroller {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
}

/* Prevent text selection during drag */
.timeline-item {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: pan-y;
}

/* Better touch targets for mobile */
.scroll-arrow {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

/* Hide arrows on very small screens when not needed */
@media (max-width: 480px) {
    .scroll-arrow {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .scroll-arrow i {
        font-size: 12px;
    }
}

/* Add active states for touch feedback */
.scroll-arrow:active {
    transform: translateY(-50%) scale(0.95);
    opacity: 0.8;
}

/* Ensure smooth transitions */
.timeline-item,
.scroll-arrow,
.timeline-point {
    transition: all 0.2s ease;
}