/* V148: history selection, destructive actions, compact statistics and data controls. */

/* Let short statistic cards follow their own content instead of stretching to a taller neighbour. */
#root#root .v95-statistics {
  align-items: start !important;
}
#root#root .v95-stat {
  align-self: start !important;
  min-height: 0 !important;
}

/* The date heading is centred over the date itself, after the selection gutter. */
@media (min-width: 761px) {
  #root#root .table-wrap.v96-selectable-picks .pick-table-v72.pick-table-v103 > thead > tr > th.pick-heading-date-v120 {
    box-sizing: border-box !important;
    padding-left: 46px !important;
    padding-right: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* The whole 40 px selection target reacts like the other interactive fields. */
  #root#root .v96-selection:is(:hover, :focus-visible) {
    background: var(--ui-hover-v138) !important;
    border: 1px solid var(--ui-hover-border-v138) !important;
    border-radius: 10px !important;
  }
}

/* Keep selected rows/cards green while the small checked box remains calm and readable. */
#root#root .table-wrap.v96-selectable-picks .pick-table-v72.pick-table-v103 > tbody > tr.pick-row.selected,
#root#root .table-wrap.v96-selectable-picks .pick-table-v72.pick-table-v103 > tbody > tr.pick-row.selected > td,
#root#root .v96-coupon-history-item.selected,
#root#root .analysis-run-row-v134.selected {
  background-color: var(--ui-selected-v138) !important;
  border-color: var(--ui-selected-border-v138) !important;
  box-shadow: none !important;
}

/* Pick detail actions have equal typography and stay on one line. */
#root#root .pick-details-actions-v135 {
  width: 200px !important;
  max-width: 100%;
}
#root#root .pick-details-actions-v135 > button {
  min-height: 44px !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* Destructive actions use one clear red treatment throughout the application. */
#root#root :is(.history-delete-selected, .remove-avatar-button, .analysis-cancel-v113, .settings-data-reset-v148) {
  color: #ffabb5 !important;
  background: #271720 !important;
  border: 1px solid #8f4b59 !important;
}
#root#root :is(.history-delete-selected, .remove-avatar-button, .analysis-cancel-v113, .settings-data-reset-v148):hover:not(:disabled) {
  color: #ffd8dd !important;
  background: #3a202b !important;
  border-color: #d97a8a !important;
}

/* The complete reset belongs to Settings and is visually separated from routine controls. */
#root#root .settings-data-danger-v148 {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  border-color: #633842 !important;
  background: linear-gradient(135deg, #15131a, #171018) !important;
}
#root#root .settings-data-danger-v148 .settings-section-icon {
  color: #ff9ca8 !important;
  background: #301922 !important;
  border-color: #6c3945 !important;
}
#root#root .settings-data-reset-v148 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  font: 750 13px/1.25 Arial, Helvetica, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
#root#root .settings-data-reset-v148:disabled {
  opacity: .55;
  cursor: wait;
}

@media (max-width: 760px) {
  #root#root .pick-details-actions-v135 {
    width: 100% !important;
  }

  /* Put the type selector in the same left-side position used by coupons and analyses. */
  #root#root .table-wrap.v96-selectable-picks .pick-table-v72.pick-table-v103 > tbody > tr.pick-row .v96-date-content > .v96-selection {
    left: 6px !important;
    right: auto !important;
  }

  /* A touch changes only the small box; the 44 px hit target stays invisible. */
  #root#root .v96-selection,
  #root#root .v96-selection:is(:hover, :active, :focus) {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
  }
  #root#root .v96-selection:is(:hover, :active) .selection-box {
    background: var(--ui-hover-v138) !important;
    border-color: var(--ui-hover-border-v138) !important;
    box-shadow: none !important;
  }

  #root#root .settings-data-danger-v148 {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }
  #root#root .settings-data-reset-v148 {
    grid-column: 1 / -1;
    width: 100%;
    white-space: normal;
  }
}

@media (hover: none), (pointer: coarse) {
  #root#root .v96-selection {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }
}

/* V149: polish the layouts after checking the deployed desktop views. */

/* A short, useful context line fills the modal heading without repeating the reasoning. */
#root#root .pick-context-v149 {
  display: block !important;
  max-width: 520px;
  margin-top: 5px !important;
  color: #95a7ba !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Every card in a grid row has one height. The second row is tall enough for its captions. */
#root#root .v95-statistics {
  align-items: stretch !important;
}
#root#root .v95-stat {
  align-self: stretch !important;
  height: 100% !important;
  box-sizing: border-box;
}
#root#root .v95-stat:is(.review, .accuracy, .roi-v98) {
  min-height: 116px !important;
}

/* A selected type is clear without green bands around the entire table row. */
#root#root .table-wrap.v96-selectable-picks .pick-table-v72.pick-table-v103 > tbody > tr.pick-row.selected,
#root#root .table-wrap.v96-selectable-picks .pick-table-v72.pick-table-v103 > tbody > tr.pick-row.selected > td {
  background: var(--ui-hover-v138) !important;
  border-color: #2b3e50 !important;
  box-shadow: none !important;
}

/* The large hit target stays invisible. Only the small square reacts to pointing. */
#root#root .v96-selection:hover {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#root#root .v96-selection:hover .selection-box {
  color: #dce6f2 !important;
  background: var(--ui-hover-v138) !important;
  border-color: var(--ui-hover-border-v138) !important;
  box-shadow: none !important;
}

/* Destructive actions remain red and restrained in every pointer state. */
#root#root#root :is(.history-delete-selected, .remove-avatar-button, .analysis-cancel-v113, .settings-data-reset-v149):is(:hover, :active, :focus-visible):not(:disabled) {
  color: #ffb2bc !important;
  background: #451d28 !important;
  border-color: #d36f80 !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}
#root#root#root :is(.history-delete-selected, .remove-avatar-button, .analysis-cancel-v113, .settings-data-reset-v149) svg {
  color: currentColor !important;
  filter: none !important;
}

/* A complete reset is a normal, padded settings card with a restrained danger accent. */
#root#root .settings-data-danger-v149 {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 24px !important;
  border-color: #633842 !important;
  background: linear-gradient(135deg, #15131a, #171018) !important;
}
#root#root .settings-data-danger-v149 h2 {
  margin: 0 0 6px !important;
  color: #f2f5f9;
  font: 700 18px/1.4 Arial, Helvetica, sans-serif !important;
}
#root#root .settings-data-danger-v149 p {
  margin: 0 !important;
  color: #a9b4c2 !important;
  font: 400 14px/1.5 Arial, Helvetica, sans-serif !important;
}
#root#root .settings-data-danger-v149 .settings-section-icon {
  color: #ff9ca8 !important;
  background: #301922 !important;
  border-color: #6c3945 !important;
}
#root#root .settings-data-reset-v149 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #8f4b59 !important;
  border-radius: 10px;
  background: #271720 !important;
  color: #ffabb5 !important;
  font: 750 13px/1.25 Arial, Helvetica, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}

/* Date/day fields use the space their contents need instead of filling the card. */
@media (min-width: 761px) {
  #root#root .analysis-range-v133 .schedule-fields-v130 {
    grid-template-columns: repeat(2, minmax(0, 270px)) !important;
    justify-content: start !important;
    width: fit-content !important;
    max-width: 100% !important;
  }
  #root#root .analysis-range-v133 .schedule-field-v130 {
    width: 270px;
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  #root#root .settings-data-danger-v149 {
    grid-template-columns: auto minmax(0, 1fr) !important;
    padding: 20px !important;
  }
  #root#root .settings-data-reset-v149 {
    grid-column: 1 / -1;
    width: 100%;
    white-space: normal;
  }
  #root#root .analysis-range-v133 .schedule-field-v130 {
    width: 100%;
  }
}
