/* Clickable chip checkbox */
.cb {
  display: inline-flex;
  width: 100%;
  align-items: center;
  border-radius: 0.75rem; /* rounded-xl */
  border: 2px solid rgb(203 213 225); /* slate-300 */
  background-color: white;
  padding: 0.625rem 0.75rem; /* py-2.5 px-3 */
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); /* shadow-sm */
  transition: all 0.15s ease;
  background-color: #eeeff3;
}
.cb:hover {
  border-color: rgb(96 165 250); /* blue-400 */
}

/* Hide the real checkbox but keep it accessible */
.cb > input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Visual square box */
.cb .box {
  margin-right: 0.5rem;
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem; /* rounded */
  border: 1px solid rgb(203 213 225); /* slate-300 */
  background-color: white;
  transition: all 0.15s ease;
}
.cb .check {
  display: none;
  width: 0.75rem;
  height: 0.75rem;
  color: white;
}
.cb .label {
  color: rgb(71 85 105); /* slate-700 */
}

/* Checked state */
.cb > input:checked ~ .box {
  border-color: rgb(37 99 235); /* blue-600 */
  background-color: rgb(37 99 235); /* blue-600 */
}
.cb > input:checked ~ .box .check {
  display: block;
}
.cb > input:checked ~ .label {
  color: rgb(29 78 216); /* blue-700 */
}

.cb:has(> input:checked) {
  border: 2px solid #5c7ffa;
}

/* Focus ring */
.cb > input:focus-visible ~ .box {
  outline: 2px solid rgb(59 130 246); /* blue-500 */
  outline-offset: 2px;
}

/* Disabled look */
.cb--disabled {
  cursor: not-allowed;
  background-color: rgb(241 245 249); /* slate-100 */
  opacity: 0.7;
}
.cb--disabled:hover {
  border-color: rgb(203 213 225); /* keep border slate-300 */
}


/* --- helpers for radio visibility & toggle --- */
.radio-visible {
  width: 20px;
  height: 20px;
  border-radius: 9999px;       /* keep round */
  background: #fff;            /* visible on gray bg */
  box-shadow: 0 0 0 1px #94a3b8; /* subtle border so it doesn't disappear */
  accent-color: #2563eb;       /* blue when checked (modern browsers) */
}

/* label text styling when the preceding radio is checked */
.radio-visible:checked + .radio-label {
  color: #1e40af;              /* blue-800 */
  font-weight: 700;
}

/* visible custom radio with check icon */
.radio-check{
  appearance:none;-webkit-appearance:none;-moz-appearance:none;
  width:20px;height:20px;border-radius:9999px;
  border:2px solid #94a3b8;background:#fff;display:grid;place-items:center;
  cursor:pointer;transition:.15s;
}
.radio-check:checked{border-color:#2563eb !important; background:#2563eb !important;}
.radio-check:checked::after{
  content:"";width:10px;height:10px;background:#fff;
  mask:url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M16.707 5.293a1 1 0 0 0-1.414 0L8 12.586 4.707 9.293A1 1 0 1 0 3.293 10.707l4 4a1 1 0 0 0 1.414 0l8-8a1 1 0 0 0 0-1.414z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask:url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M16.707 5.293a1 1 0 0 0-1.414 0L8 12.586 4.707 9.293A1 1 0 1 0 3.293 10.707l4 4a1 1 0 0 0 1.414 0l8-8a1 1 0 0 0 0-1.414z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Row-level state (NO ids): show .details when this row has a checked YES */
.issue-row .details{display:none;}
.issue-row:has(input[type="radio"][value="yes"]:checked) .details{display:block;}

/* Hide "No major issues detected" text on mobile when Yes is selected */
@media (max-width: 767px) {
  .issue-row:has(input[type="radio"][value="yes"]:checked) .no-issues-text{display:none;}
}

.peer-checked:after:translate-x-fixed {
  --tw-translate-x: 50% !important;
}

.sidebar_item img {
  width: 1.2rem;
}

.sidebar_item img.active {
  display: none;
}

.sidebar_item.active img.regular {
  display: none;
}

.sidebar_item.active {
  background-color: #5c7ffa;
  color: #fff;
}

.sidebar_item.active img.active {
  display: block;
}

.blue-gradient {
  background: #374C96;
  background: linear-gradient(180deg,rgba(55, 76, 150, 1) 0%, rgba(92, 127, 249, 1) 100%);
}

.cc-container label {
  display: flex;
  align-items: center;
}

.cc-container label svg {
  width: 1.2rem;
}

/* Circular Progress Styles */
.circle-wrap {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  position: relative;
}

@media (min-width: 768px) {
  .circle-wrap {
    width: 120px;
    height: 120px;
  }
}

.progress-svg {
  display: block;
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.track {
  fill: none;
  stroke: #e6e6e6;
  stroke-width: 8;
}

.indicator {
  fill: none;
  stroke: #4f46e5;
  stroke-linecap: round;
  stroke-width: 8;
  transition: stroke-dashoffset 800ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.indicator.good {
  stroke: #10b981; /* green */
}

.indicator.average {
  stroke: #f59e0b; /* amber */
}

.indicator.poor {
  stroke: #ef4444; /* red */
}

.percent-label {
  position: absolute;
  font-weight: 600;
  font-size: 0.875rem;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #374151;
}

@media (min-width: 768px) {
  .percent-label {
    font-size: 1rem;
  }
}

/* Defect Tab Styling */
.defect-tab-item {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.defect-tab-item:hover {
  background-color: #f8fafc;
}

.defect-tab-item.bg-blue-50 {
  background-color: #eff6ff;
}

.defect-tab-content {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Swiper Carousel Styles */
.vehicleSwiper,
.vehicleSpecSwiper {
  width: 100%;
  height: 100%;
}

.vehicleSwiper .swiper-slide,
.vehicleSpecSwiper .swiper-slide {
  position: relative;
  background: #000;
}

.vehicleSwiper .swiper-slide img,
.vehicleSpecSwiper .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicleSwiper .swiper-button-next,
.vehicleSwiper .swiper-button-prev,
.vehicleSpecSwiper .swiper-button-next,
.vehicleSpecSwiper .swiper-button-prev {
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.vehicleSwiper .swiper-button-next:hover,
.vehicleSwiper .swiper-button-prev:hover,
.vehicleSpecSwiper .swiper-button-next:hover,
.vehicleSpecSwiper .swiper-button-prev:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: scale(1.1);
}

.vehicleSwiper .swiper-button-next:after,
.vehicleSwiper .swiper-button-prev:after,
.vehicleSpecSwiper .swiper-button-next:after,
.vehicleSpecSwiper .swiper-button-prev:after {
  font-size: 20px;
  font-weight: bold;
}

.vehicleSwiper .swiper-pagination-bullet,
.vehicleSpecSwiper .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.5;
  width: 10px;
  height: 10px;
}

.vehicleSwiper .swiper-pagination-bullet-active,
.vehicleSpecSwiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: #4f46e5;
  transform: scale(1.2);
}

/* Earnings page responsive table/cards */
.earnings-table-wrapper {
  display: none;
}

.earnings-cards-wrapper {
  display: block;
}

@media (min-width: 1024px) {
  .earnings-table-wrapper {
    display: block;
  }

  .earnings-cards-wrapper {
    display: none;
  }
}

/* Toggle Switch Styles */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .toggle-slider {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  background-color: #cbd5e0;
  border-radius: 999px;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
}

.toggle-switch .toggle-slider::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: white;
  top: 1px;
  left: 1px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
  background-color: #5ab42f;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::after {
  transform: translateX(22px);
}

.toggle-switch input[type="checkbox"]:focus + .toggle-slider {
  box-shadow: inset 0 0 0 2px rgba(90, 180, 47, 0.3);
}

.toggle-switch .toggle-label {
  font-weight: 500;
  color: #1f2937;
  user-select: none;
}

/* Swiper Slider Styles */
.swiper {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.swiper-wrapper {
  align-items: center;
}
.swiper-slide {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: 100% !important;
  background: #f8f8f8;
}
.swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: auto;
}
.vehicle-swiper,
.info-swiper {
  overflow: hidden;
}
.swiper-button-next,
.swiper-button-prev {
  width: 40px !important;
  height: 40px !important;
  background-color: rgba(156, 163, 175, 0.9);
  border-radius: 50%;
  top: 50% !important;
  transform: translateY(-50%);
}
.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 16px !important;
  color: white;
  font-weight: bold;
}
.swiper-button-prev {
  left: 10px !important;
}
.swiper-button-next {
  right: 10px !important;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: rgba(107, 114, 128, 1);
}
.swiper-pagination {
  bottom: 10px !important;
}
.swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.7);
  opacity: 1;
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.swiper-pagination-bullet-active {
  background: #3b82f6;
  border-color: #3b82f6;
}