/* ===============================
   General Styles
   =============================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* ===============================
   Accordion styles
   =============================== */
.accordion {
    background-color: white;
    color: #253551;
    cursor: pointer;
    padding: 18px 50px 18px 18px; /* Left padding: 18px, Right padding: 50px for the +/- symbol */
    width: 100%;
    border: none;
    border-top: 1px solid #d6dde9;
    text-align: left;
    outline: none;
    font-size: 1.2rem;
    font-weight: medium;
    position: relative; /* For pseudo-elements */
    transition: background-color 0.4s, color 0.4s;
}

.accordion:last-of-type {
    border-bottom: 1px solid #d6dde9;
}

.accordion.active,
.accordion:hover {
    background-color: #d6dde9;
    font-weight: bold;
}

/* Accordion symbols */
.accordion::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #d6dde9;
    transition: transform 0.3s ease, color 0.3s ease;
}

.accordion.active::after {
    content: "-";
    transform: translateY(-50%) rotate(180deg);
    color: #253551;
}

.accordion:hover::after {
    color: #253551;
}

/* ===============================
   Panel styles
   =============================== */
.panel {
    padding: 0 18px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Responsive grid */
    color: #253551; /* Dark blue text color */
}

@media (max-width: 768px) {
    .panel {
        grid-template-columns: 1fr; /* Single column on small screens */
    }
}

.panel > div {
    padding: 15px; /* Padding inside grid items */
}

/* ===============================
   Base switch styles
   =============================== */
.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    margin: 0 10px; /* Ensure consistent margin */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider,
.switch .slider1 {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: background-color 0.4s;
    border-radius: 30px; /* Consistent border-radius */
    box-sizing: border-box; /* Include padding and border in dimensions */
}

/* Default switch styles */
.switch .slider {
    background-color: #253551; /* Default background color */
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: transform 0.4s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: #253551;
}

.switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Custom toggle switch styles */
.switch.custom-toggle .slider1 {
    background-color: #d6dde9; /* Light blue when off */
}

.switch.custom-toggle .slider1:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: transform 0.4s;
    border-radius: 50%;
}

.switch.custom-toggle input:checked + .slider1 {
    background-color: #253551; /* Dark blue when on */
}

.switch.custom-toggle input:checked + .slider1:before {
    transform: translateX(26px);
}

/* Center switches vertically */
.switch,
.switch.custom-toggle {
    display: flex;
    align-items: center;
}

/* Label text styles */
.label-text {
    cursor: pointer;
    margin: 0;
    transition: color 0.4s, font-weight 0.4s;
    color: #d6dde9; /* Light blue */
    font-weight: normal;
    word-break: break-word;
    text-align: center;
}

.label-text.active {
    color: #253551; /* Dark blue */
    font-weight: bold;
}

/* Filters container */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
    margin: 10px 0;
    padding: 0 10px;
}

/* Filter item */
.filter-item {
    flex: 1 1 22%;
    box-sizing: border-box;
    margin: 5px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Toggle group */
.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.toggle-group.center {
    justify-content: center;
}

/* Toggle labels */
.toggle-label {
    flex: 1;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-label.left {
    text-align: right;
    justify-content: flex-end;
}

.toggle-label.right {
    text-align: left;
    justify-content: flex-start;
}

/* Adjustments for smaller screens */
@media (max-width: 1300px) {
    .filter-item {
        flex: 1 1 45%;
    }
}

@media (max-width: 800px) {
    .filter-item {
        flex: 1 1 100%;
    }
}

/* Select2 styles */
.select2-container--default .select2-selection--multiple {
    background-color: white;
    border: 1px solid #aaa;
    border-radius: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #253551;
    border: 1px solid #253551;
    color: white;
    border-radius: 4px;
    padding: 0 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    cursor: pointer;
    margin-right: 5px;
}

/* ===============================
   Case entry styles
   =============================== */
.case-entry {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    transition: font-weight 0.3s;
    position: relative;
}

/* Uncompleted: empty square checkbox */
.case-entry::before {
  content: "\f0c8";                 /* fa-square */
  font: var(--fa-font-regular);
  font-size: 18px;

  /* ✅ key: bigger hitbox but stays in the same place */
  width: 28px;                      /* was 18px */
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;                   /* reserve space so text never overlaps */

  margin-right: 10px;
  color: #d6dde9;
  background: transparent;
  transition: color 0.3s, transform 0.15s;
  cursor: pointer;
}


/* Default hover: square turns dark blue */
.case-entry:hover {
    font-weight: bold;
}

.case-entry:hover::before {
    color: #253551;                   /* dark blue */
}

.case-entry::before:active {
    transform: translateY(-50%) scale(0.9);
}

.case-entry a {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;
    text-decoration: none;
    color: #253551;
}

.case-entry i.star-icon {
    flex-shrink: 0;
    color: #d6dde9;
    transition: color 0.3s;
}

/* ===============================
   Actions cluster
   =============================== */
.case-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    min-width: max-content;
}

.case-entry i.video-icon {
    color: #d6dde9;
    font-size: 1.2rem;
    margin-right: 10px;
    transition: color .3s;
}

.case-actions i {
    line-height: 1;
    vertical-align: middle;
}

.case-actions a:not(.video-link) {
    white-space: nowrap;
}

.case-entry:hover i.video-icon,
.case-entry:hover i.star-icon {
    color: #253551;
}

/* ===============================
   ✅ COMPLETED CASE STATE (single FA checkbox icon)
   =============================== */
:root {
    --sca-green-light: #9ad6a9; /* light green to mirror light blue */
    --sca-green-dark: #2f7d3b;  /* darker green to mirror dark blue */
}

/* Completed: outlined green checkbox */
.case-entry.is-completed::before {
  content: "\f14a";                 /* fa-square-check */
  font: var(--fa-font-regular);
  font-size: 18px;

  width: 28px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;

  margin-right: 10px;
  background: transparent;
  color: #4fbf67;
  transition: color 0.2s, transform 0.15s;
  cursor: pointer;
}

/* Completed hover: dark green */
.case-entry.is-completed:hover::before {
    color: #1f7a3a;
}

/* ===============================
   Button styles
   =============================== */
#refreshButton {
    background-color: #d6dde9; /* Light blue */
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    outline: none;
}

#refreshButton:hover,
#refreshButton:focus {
    background-color: #253551; /* Dark blue on hover/focus */
    transform: scale(1.05);
    outline: none;
}

#refreshButton:active {
    transform: scale(0.95);
}
