/* The group assignment form's tick-boxes (.checkbox-wrapper-46) and saved-group
   picker (.group-selection-modal, .group-option, .custom-radio, .details-…),
   for the Project / Report form too. Copied from common_group_cpage.css (its
   "checkbox-wrapper-46", "New Group Selection UI Styles" and paper-look
   saved-groups blocks): keep the two in step. Loaded before cover_paper.css,
   whose paper colours for the tick-boxes then apply, as on the group form. */

.checkbox-wrapper-46 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  height: 100%;
  margin: 0 auto;
  margin-bottom: 30px;
}

.checkbox-wrapper-46 input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.checkbox-wrapper-46 .cbx {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: pointer;
}
.checkbox-wrapper-46 .cbx span {
  display: inline-block;
  vertical-align: middle;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}
.checkbox-wrapper-46 .cbx span:first-child {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  -webkit-transform: scale(1);
  -ms-transform: scale(1);
  transform: scale(1);
  vertical-align: middle;
  border: 1px solid #9098a9;
  -webkit-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
.checkbox-wrapper-46 .cbx span:first-child svg {
  position: absolute;
  top: 3px;
  left: 2px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16px;
  stroke-dashoffset: 16px;
  -webkit-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  -webkit-transition-delay: 0.1s;
  -o-transition-delay: 0.1s;
  transition-delay: 0.1s;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}
.checkbox-wrapper-46 .cbx span:first-child:before {
  content: "";
  width: 100%;
  height: 100%;
  background: #506eec;
  display: block;
  -webkit-transform: scale(0);
  -ms-transform: scale(0);
  transform: scale(0);
  opacity: 1;
  border-radius: 50%;
}

.checkbox-wrapper-46 .cbx span:last-child {
  padding-left: 8px;
}

.checkbox-wrapper-46 .cbx:hover span:first-child {
  border-color: #506eec;
}

.checkbox-wrapper-46 .inp-cbx:checked + .cbx span:first-child {
  background: #506eec;
  border-color: #506eec;
  -webkit-animation: wave-46 0.4s ease;
  animation: wave-46 0.4s ease;
}

.checkbox-wrapper-46 .inp-cbx:checked + .cbx span:first-child svg {
  stroke-dashoffset: 0;
}

.checkbox-wrapper-46 .inp-cbx:checked + .cbx span:first-child:before {
  -webkit-transform: scale(3.5);
  -ms-transform: scale(3.5);
  transform: scale(3.5);
  opacity: 0;
  -webkit-transition: all 0.6s ease;
  -o-transition: all 0.6s ease;
  transition: all 0.6s ease;
}

.checkbox-wrapper-46 input[type="checkbox"]:focus + .cbx,
.checkbox-wrapper-46 .cbx:focus {
  outline: none;
}

.checkbox-wrapper-46 .inp-cbx:focus + .cbx span:first-child,
.checkbox-wrapper-46 .inp-cbx:focus-visible + .cbx span:first-child {
  border-color: var(--cpage-focus-blue);
  -webkit-box-shadow: 0 0 0 3px var(--cpage-focus-ring);
  box-shadow: 0 0 0 3px var(--cpage-focus-ring);
}

.checkbox-wrapper-46 > label > span:nth-child(2):focus {
  outline: none;
}

@-webkit-keyframes wave-46 {
  50% {
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
  }
}

@keyframes wave-46 {
  50% {
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
  }
}

/* --- New Group Selection UI Styles --- */

.group-selection-modal {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Custom Scrollbar */
.group-selection-modal::-webkit-scrollbar {
  width: 6px;
}

.group-selection-modal::-webkit-scrollbar-track {
  background: #252525;
}

.group-selection-modal::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 10px;
}

.group-selection-modal::-webkit-scrollbar-thumb:hover {
  background: #ef986d;
}

.group-option {
  -webkit-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  border: 1px solid #444 !important;
}

.group-option:hover {
  border-color: #ef986d !important;
}

.group-header {
  -webkit-transition: background 0.2s ease;
  -o-transition: background 0.2s ease;
  transition: background 0.2s ease;
}

.group-header:hover {
  background: #444 !important;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  color: #ddd;
}

.details-table th,
.details-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #444;
  font-size: 0.85rem;
}

.details-table th {
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.details-row:last-child td {
  border-bottom: none;
}

/* Smooth expansion */
.details-container {
  max-height: 0;
  overflow: hidden;
  -webkit-transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s ease,
    opacity 0.4s ease;
  -o-transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s ease,
    opacity 0.4s ease;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s ease,
    opacity 0.4s ease;
  opacity: 0;
}

.details-container.expanded {
  /* JS sets inline max-height for precise transition */
  padding: 0 15px 15px 15px;
  opacity: 1;
}

/* Radio Button Styling */
.custom-radio {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #555;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  -webkit-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  transition: all 0.2s ease;
  background: #252525;
}

.custom-radio:checked {
  background: #ef986d;
  border-color: #ef986d;
}

.custom-radio:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  color: #000;
  font-size: 14px;
  font-weight: bold;
}

.delete-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 5px;
  -webkit-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  color: #ff5252;
  -webkit-transform: scale(1.1);
  -ms-transform: scale(1.1);
  transform: scale(1.1);
}

.toggle-arrow {
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  -o-transition: transform 0.3s ease;
  transition: transform 0.3s ease;
  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
  transition:
    transform 0.3s ease,
    -webkit-transform 0.3s ease;
  transition:
    transform 0.3s ease,
    -webkit-transform 0.3s ease;
  transition:
    transform 0.3s ease,
    -webkit-transform 0.3s ease;
}

.toggle-arrow.rotated {
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}

/* Saved-groups pop-up ("Select Group to Load"), in the paper look. */
.group-selection-modal::-webkit-scrollbar-track {
  background: #efd3bf;
}

.group-selection-modal::-webkit-scrollbar-thumb {
  background: #8a7366;
}

.group-selection-modal::-webkit-scrollbar-thumb:hover {
  background: #333333;
}

.group-option {
  border: 2.5px solid #333333 !important;
}

.group-option:hover {
  border-color: #333333 !important;
}

.group-header:hover {
  background: #dcf2ea !important;
}

.details-table {
  color: #3d2f27;
}

.details-table td {
  border-bottom: 2px dashed #d6b39c;
}

.details-table th {
  color: #6e5a4e;
}

.custom-radio {
  background: #f6e2d2;
  border: 2px solid #333333;
}

.custom-radio:checked {
  background: #93f9e8;
  border-color: #333333;
}

.custom-radio:checked::after {
  color: #333333;
}

.delete-btn {
  color: #8a3b1f;
}

/* Saved-groups radios: always a true circle (fixed size, never squeezed by
   the row's flexbox), with an ink dot when chosen. */
.group-selection-modal .custom-radio {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  -webkit-box-flex: 0;
      -ms-flex: 0 0 22px;
          flex: 0 0 22px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  width: 22px !important;
  min-width: 22px;
  max-width: 22px;
  height: 22px !important;
  min-height: 22px;
  max-height: 22px;
  margin: 0 14px 0 0 !important;
  padding: 0 !important;
  aspect-ratio: 1;
  background: #fbefe5;
  border: 2.5px solid #333333;
  border-radius: 50%;
  -webkit-box-shadow: 2px 2px 0 #333333;
          box-shadow: 2px 2px 0 #333333;
  accent-color: #333333;
}

.group-selection-modal .custom-radio:checked {
  background: #93f9e8;
  border-color: #333333;
}

.group-selection-modal .custom-radio:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  background: #333333;
  border-radius: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}

/* ---- Copied from common_group_cpage.css: the saved-groups floating icon
   (its paper look is in cover_paper.css). Keep the two in step. ---- */
/* Group Icon Floating Button */
.group-float {
  position: fixed;
  left: 20px;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  background: #ef986d;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: none; /* Default hidden, JS toggles flex */
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  -webkit-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  -webkit-transition: -webkit-transform 0.2s;
  transition: -webkit-transform 0.2s;
  -o-transition: transform 0.2s;
  transition: transform 0.2s;
  transition: transform 0.2s, -webkit-transform 0.2s;
  transition:
    transform 0.2s,
    -webkit-transform 0.2s;
  transition:
    transform 0.2s,
    -webkit-transform 0.2s;
  transition:
    transform 0.2s,
    -webkit-transform 0.2s;
}

@media (min-width: 1500px) {
  .group-float {
    width: 55px;
    height: 55px;
    left: calc((100% - 1500px) / 2 + 30px);
  }
}
