/* Swipe overlay */
.swipe-overlay {
  background-color: var(--app-nav-active-bg);
  color: var(--app-text-primary);
}


/* Home Swipe Card*/
.homeAnimalDisplayCard {
  position: relative;
  padding: 1rem;
  background-color: var(--app-surface-0); /* Dark background to match site theme */
  border: 2px solid var(--app-border); /* Subtle border */
  border-radius: 10px; /* Keep rounded corners */
  color: var(--app-text-primary); /* Light text for contrast */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Subtle shadow for depth */
  overflow: hidden; /* Keep content within rounded corners */
  min-width: 450px;
  justify-self: center;
  margin: 1rem 0;
  -webkit-user-select: none;
  user-select: none;
}

/* Card Image */
.homeAnimalDisplayCard > div:nth-of-type(1) {
  border: solid var(--app-border) 2px;
  width: 100%;
  overflow: hidden;
}

.homeAnimalDisplayCard > div:nth-of-type(1) img {
  width: 100%;
  height: 250px;
  pointer-events: none;
}

/* Card Text, old .infoCard */
.homeAnimalDisplayCard > div:nth-of-type(2) {
  border-right: solid var(--app-border) 2px;
  border-left: solid var(--app-border) 2px;
  border-bottom: solid var(--app-border) 2px;
  /* overflow-x: scroll; */
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.biography {
  /*background: var(--bs-gray-800);*/
  /* padding: 0.25rem 1rem; */
  border-bottom: solid var(--app-border) 2px;
  font-size: 12px;
  display: flex;
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.identification {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /*background: var(--bs-gray-900);*/
  padding: 4px;
}

/* NameAge */
.homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.nameAge {
  /* place-content: center; */
  /* text-align: center; */
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 4px;
  /*justify-content: space-between;*/
  border-bottom: solid var(--app-border) 1px;
}

/* Name */
.homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.nameAge > .animalName {
}

/* Age */
.homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.nameAge > .animalAge {
  font-size: 10px;
  color: var(--app-text-muted);
}

.requirementsInfoIcon {
  margin-left: auto;
  padding: 0.12rem 0.1rem;
  line-height: 1;
  font-size: 0.95rem;
  cursor: pointer;
}

.requirementsInfoIcon:hover,
.requirementsInfoIcon:focus-visible {
  color: var(--app-accent-soft);
  outline: none;
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.breed {
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  align-self: flex-start;
  gap: 0.25rem;
  align-items: center;
}

/*breed name*/
.homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.breed > span:nth-of-type(1) {
}

/*sci*/
.homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.breed > span:nth-of-type(2) {
  font-size: 10px;
}

/*common*/
.homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.breed > span:nth-of-type(3) {
  font-size: 6px;
  font-weight: 200;
  color: var(--app-text-muted);
}


.sciComTag {
  display: flex;
  flex-direction: column;


  padding: 0 0.25rem;
  border-radius: 2px;

  font-size: 10px;
  text-align: center;
}


.homeAnimalDisplayCard > div:nth-of-type(2) div.classification {
  display: flex;
  flex-wrap: wrap;
  font-size: 10px;
  padding: 0;
  gap: 1px;

  border-top: solid var(--app-border) 2px;
  border-bottom: solid var(--app-border) 2px;
}


.homeAnimalDisplayCard > div:nth-of-type(2) div.classification > div {
  flex: 1;
  text-align: center;
  place-content: center;
  padding: 2px 0px 1px 0px;
  background-color: var(--app-surface-1);
  height: 25px;
  overflow: hidden;
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.classification > div:hover {
  text-wrap-mode: nowrap;
  text-align: center;
  place-content: center;
  padding: 2px 0px 1px 0px;
  /*background-color: var(--bs-gray-400);*/
  overflow: unset;
}


.homeAnimalDisplayCard > div:nth-of-type(2) div.classification .comName,
.sciComTag > .comName {
  color: var(--app-text-primary);
  font-size: .5em;
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.classification .sciName {
  /*color:white;*/
  padding: 0 4px;
  text-overflow: ellipsis;
  text-wrap-mode: nowrap;
  overflow: auto;
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.classification > div:hover {
  /* font-weight:bold; */
  filter: brightness(1.25);
  outline: solid var(--app-border-strong) 1px;
}


.homeAnimalDisplayCard > div:nth-of-type(2) div.buttons {
  /*background: var(--bs-gray-700);*/
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.homeAnimalDisplayCard > div:nth-of-type(2) > div.buttons button {
  border-radius: 5px;
  height: 50px;
  width: 100%;
  color: var(--app-text-primary);
  border: solid var(--app-border) 2px;
}


.homeAnimalDisplayCard > div:nth-of-type(2) > div.buttons > div:nth-of-type(1) > button {
  background-color: var(--bs-primary-border-subtle);
}

.homeAnimalDisplayCard > div:nth-of-type(2) > div.buttons > div:nth-of-type(2) > button {

}

.homeAnimalDisplayCard > div:nth-of-type(2) > div.buttons > div:nth-of-type(3) > button {

}

.classification div[title] {
  /*text-decoration: underline;*/
  cursor: help;
}


textarea {
  width: 100%;
  max-width: 600px;
  min-height: 150px;
  padding: 0.5rem;
  background-color: var(--app-surface-2);
  color: var(--app-text-primary);
  border: 1px solid var(--app-border-strong);
  /*border-radius: 14px;*/
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  resize: none;
  outline: none;
  caret-color: var(--app-accent);

  scrollbar-width: none;
}

textarea::placeholder {
  color: var(--app-text-muted);
  font-style: italic;
}

/*
textarea:focus {
  border-color: #ff4b4b;
  box-shadow: 0 0 0 3px rgba(255, 75, 75, 0.3);
  background-color: #252525;
}
*/

textarea::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

textarea {
  scrollbar-width: none; /* Firefox */
}


/* Classification section */
.classification {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background-color: var(--app-surface-1);
}

.classification > div {
  background-color: var(--app-surface-2); /* Darker background */
  border: 1px solid;
  /*border-radius: 4px;*/
  padding: 4px 8px;
  font-size: 14px;
}


/* Biography section */

.biography textarea {
  width: 100%;
  background-color: transparent;
  border: none;
  resize: none;
  font-size: small;
  line-height: 1.5;
  color: var(--app-text-secondary);

  scrollbar-width: thin; /* options: auto, thin, none */
  scrollbar-color: var(--app-text-primary) var(--app-surface-1); /* thumb color, track color */
}

.adoptionRequirementsSection {
  border-top: solid var(--app-border) 2px;
  border-bottom: solid var(--app-border) 2px;
  padding: 0.5rem;
  background: color-mix(in srgb, var(--app-surface-1) 72%, transparent);
}

.adoptionRequirementsHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.adoptionRequirementsHeader h5 {
  margin: 0;
  font-size: 0.95rem;
}

.adoptionRequirementsHeader span {
  font-size: 0.72rem;
  color: var(--app-text-muted);
}

.adoptionRequirementsList {
  display: grid;
  gap: 0.35rem;
  max-height: 180px;
  overflow: auto;
}

.adoptionRequirementItem {
  border: 1px solid var(--app-border);
  background: color-mix(in srgb, var(--app-surface-2) 72%, transparent);
  padding: 0.4rem;
  border-radius: 6px;
}

.adoptionRequirementTop {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.adoptionRequirementTop strong {
  font-size: 0.84rem;
}

.adoptionRequirementMeta {
  color: var(--app-text-secondary);
  font-size: 0.7rem;
}

.requirementsAction {
  border-top: solid var(--app-border) 2px;
  border-bottom: solid var(--app-border) 2px;
  padding: 0.4rem;
  display: flex;
  justify-content: center;
}

.requirementsModalList {
  display: grid;
  gap: 0.75rem;
}

.requirementsTypeTabs {
  border-bottom-color: var(--app-border-strong);
}

.requirementsTypeTabs .nav-link {
  border: 1px solid transparent;
  border-bottom: 0;
  color: var(--app-text-secondary);
  background: transparent;
  font-size: 0.8rem;
}

.requirementsTypeTabs .nav-link.active {
  color: var(--app-text-primary);
  background: color-mix(in srgb, var(--app-surface-1) 88%, transparent);
  border-color: var(--app-border-strong) var(--app-border-strong) color-mix(in srgb, var(--app-surface-1) 88%, transparent) var(--app-border-strong);
}

.requirementsTypeTabContent {
  border-top: 0;
  background: color-mix(in srgb, var(--app-surface-1) 82%, transparent);
  padding: 0.65rem;
}

.requirementsTypeList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.requirementsTypeListItem {
  border: 1px solid var(--app-border);
  border-radius: 9px;
  background: color-mix(in srgb, var(--app-surface-2) 90%, transparent);
  padding: 0.55rem;
}

.requirementsTypeListHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.requirementsTypeListHeader strong {
  color: var(--app-text-primary);
  font-size: 0.86rem;
}

.requirementsTypeListScope {
  border: 1px solid var(--app-border-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-surface-2) 88%, transparent);
  color: var(--app-text-secondary);
  font-size: 0.7rem;
  line-height: 1;
  padding: 0.2rem 0.42rem;
  white-space: nowrap;
}

.requirementsTypeListSource {
  color: var(--app-text-secondary);
  font-size: 0.74rem;
}

.requirementsModalItem {
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--app-surface-2) 90%, transparent);
  padding: 0.65rem;
}

.requirementsModalItem h6 {
  margin: 0 0 0.45rem;
  color: var(--app-text-primary);
}

.requirementsModalDescription {
  margin: 0 0 0.55rem;
  color: var(--app-text-secondary);
  font-size: 0.88rem;
}

.requirementsMetaGrid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.3rem 0.65rem;
}

.requirementsMetaLabel {
  font-size: 0.75rem;
  color: var(--app-text-muted);
}

.requirementsMetaValue {
  font-size: 0.8rem;
  color: var(--app-text-primary);
}

/* Buttons section */
.buttons {
  display: flex;
  justify-content: space-between;
}

.buttons .homeActionBtn-random {
  color: var(--app-text-primary);
}

.buttons .homeActionBtn-contact {
  background-color: var(--app-success);
  border: none;
}


.buttons button.shake i {
  display: block;
}


/* Dice shake animation */
@keyframes diceShake {
  0% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(-10deg) translate(-2px, -2px);
  }
  20% {
    transform: rotate(10deg) translate(2px, 2px);
  }
  30% {
    transform: rotate(-10deg) translate(2px, -2px);
  }
  40% {
    transform: rotate(10deg) translate(-2px, 2px);
  }
  50% {
    transform: rotate(-5deg) translate(-1px, -1px);
  }
  60% {
    transform: rotate(5deg) translate(1px, 1px);
  }
  70% {
    transform: rotate(-3deg) translate(1px, -1px);
  }
  80% {
    transform: rotate(3deg) translate(-1px, 1px);
  }
  90% {
    transform: rotate(-1deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/*button.shake:hover i {*/
button.shake i {
  animation: diceShake 1.2s ease-in-out infinite;
}


/* Animation variant with bounce */
@keyframes diceBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px) rotate(180deg);
  }
}

button.shake-bounce:hover i {
  animation: diceBounce 0.8s ease;
}

.optgrouppers {
  height: 50vh;
}

/* Brutalist Minimal Dark Refresh (home card only) */
main.content {
  --home-shell-tint-rgb: 72, 92, 120;
  background-color: var(--app-body-bg);
  background-image: linear-gradient(
    180deg,
    rgba(var(--home-shell-tint-rgb), var(--app-home-shell-tint-opacity-start)),
    rgba(var(--home-shell-tint-rgb), var(--app-home-shell-tint-opacity-end))
  );
  transition: background-color 260ms ease, background-image 260ms ease;
}

.homeAnimalDisplayCard {
  --animal-bg: var(--app-surface-1);
  --animal-surface: var(--app-surface-2);
  --animal-border: var(--app-border-strong);
  --animal-divider: var(--app-border);
  --animal-overlay: color-mix(in srgb, var(--app-surface-0) 76%, transparent);
  padding: 0;
  /*background: var(--animal-bg);*/
  border: 2px solid var(--animal-border);
  border-radius: 0;
  box-shadow: none;
  color: var(--app-text-primary);
  min-width: 450px;
  transition: background-color 260ms ease, border-color 260ms ease;
}

.homeAnimalDisplayCard > div:nth-of-type(1) {
  border: 0;
  border-bottom: 2px solid var(--animal-divider);
}

.homeAnimalDisplayCard > div:nth-of-type(1) img {
  height: 260px;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(1.02);
}

.homeAnimalDisplayCard > div:nth-of-type(2) {
  border: 0;
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.identification {
  padding: 0.55rem 0.65rem;
  border-bottom: 2px solid var(--animal-divider);
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.nameAge {
  border-bottom: 1px solid var(--animal-divider);
  margin-bottom: 0.32rem;
  padding-bottom: 0.25rem;
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.nameAge > .animalAge {
  color: var(--app-text-muted);
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.breed {
  color: var(--app-text-secondary);
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.classification {
  border-top: 0;
  border-bottom: 2px solid var(--animal-divider);
  padding: 0;
  gap: 0;
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.classification > div {
  border-right: 1px solid var(--animal-divider);
  background: var(--animal-surface);
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.classification > div:last-child {
  border-right: 0;
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.classification > div:hover {
  outline: none;
  filter: brightness(1.12);
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.biography {
  border-bottom: 2px solid var(--animal-divider);
}

.homeAnimalDisplayCard > div:nth-of-type(2) div.buttons {
  gap: 0;
}

.homeAnimalDisplayCard > div:nth-of-type(2) > div.buttons button {
  border-radius: 0;
  border: 0;
  border-right: 1px solid var(--animal-divider);
  border-top: 0;
  color: var(--app-text-primary);
}

.homeActionBtn {
  min-height: 50px;
  background: var(--app-surface-2);
}

.homeActionBtn-random {
  background: var(--app-accent-strong);
}

.homeActionBtn-filter {
  background: var(--app-surface-2);
}

.homeActionBtn-contact {
  background: var(--app-success);
}

.homeAnimalDisplayCard > div:nth-of-type(2) > div.buttons > div:last-child button {
  border-right: 0;
}

.swipe-overlay {
  background-color: var(--animal-overlay);
  border: 2px solid var(--animal-border);
  border-top: 0;
  transition: background-color 260ms ease, border-color 260ms ease;
}

#filterModal .inputFilterSelect {
  width: 100%;
  margin-bottom: 0.7rem;
  padding: 0.45rem 0.55rem;
  border-width: 1px;
  border-color: var(--app-border-strong);
  background: var(--app-surface-2) !important;
  color: var(--app-text-primary);
  border-radius: 0;
  box-shadow: none;
  font-family: "Courier New", monospace;
  letter-spacing: 0.01em;
}

#filterModal .inputFilterSelect::placeholder {
  color: var(--app-text-muted);
  opacity: 1;
}

#filterModal .inputFilterSelect:focus {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 1px var(--app-accent);
  background: var(--app-surface-2) !important;
  color: var(--app-text-primary);
}

#filterModal .filterMatchScore {
  margin: -0.2rem 0 0.65rem;
  padding: 0.18rem 0.05rem;
  color: var(--app-text-muted);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--app-border);
}

#filterModal .form-select.optgrouppers {
  height: 52vh;
  padding: 0;
  border-width: 1px;
  border-color: var(--app-border-strong);
  background: var(--app-surface-2) !important;
  color: var(--app-text-primary);
  border-radius: 0;
  box-shadow: none;
  font-family: "Courier New", monospace;
  line-height: 1.2;
  scrollbar-width: thin;
  scrollbar-color: var(--app-border-strong) var(--app-surface-2);
}

#filterModal .form-select.optgrouppers:focus {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 1px var(--app-accent);
}

#filterModal .form-select.optgrouppers option {
  padding: 0.42rem 0.5rem;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface-2);
  color: var(--app-text-primary);
}

#filterModal .form-select.optgrouppers option:checked {
  background: linear-gradient(0deg, var(--app-accent-strong), var(--app-accent-strong));
  color: var(--app-text-primary);
}

#filterModal .form-select.optgrouppers option[disabled] {
  background: var(--app-surface-2);
  color: var(--app-text-muted);
  font-weight: 700;
}

#filterModal .form-select.optgrouppers::-webkit-scrollbar {
  width: 8px;
}

#filterModal .form-select.optgrouppers::-webkit-scrollbar-track {
  background: var(--app-surface-2);
}

#filterModal .form-select.optgrouppers::-webkit-scrollbar-thumb {
  background: var(--app-border-strong);
  border: 1px solid var(--app-surface-2);
}

#filterModal .buttonpx,
#getInTouchModal .buttonpx {
  border-radius: 0;
  border: 1px solid var(--app-border-strong);
  box-shadow: none;
}

#filterModal label,
#getInTouchModal label {
  color: var(--app-text-secondary);
}

@media (max-width: 575.98px) {
  .homeAnimalDisplayCard {
    min-width: 100%;
  }
}

@media (max-width: 991.98px) {
  .homeAnimalDisplayCard {
    min-width: 0;
    width: 100%;
    margin: 0.75rem 0;
  }

  .homeAnimalDisplayCard > div:nth-of-type(1) img {
    height: 230px;
  }

  .homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.nameAge {
    flex-wrap: wrap;
    row-gap: 0.2rem;
  }

  .requirementsInfoIcon {
    margin-left: 0;
  }

  .homeAnimalDisplayCard > div:nth-of-type(2) div.identification > div.breed {
    flex-wrap: wrap;
  }

  .homeAnimalDisplayCard > div:nth-of-type(2) div.classification > div {
    flex: 1 1 calc(50% - 1px);
  }

  .biography textarea {
    min-height: 120px;
  }
}

@media (max-width: 767.98px) {
  main.content {
    --home-shell-tint-rgb: 62, 86, 118;
  }

  .homeAnimalDisplayCard > div:nth-of-type(1) img {
    height: 210px;
  }

  .homeAnimalDisplayCard > div:nth-of-type(2) div.classification > div {
    flex: 1 1 100%;
    border-right: 0;
    border-bottom: 1px solid var(--animal-divider);
  }

  .homeAnimalDisplayCard > div:nth-of-type(2) div.classification > div:last-child {
    border-bottom: 0;
  }

  #filterModal .form-select.optgrouppers {
    height: 42vh;
  }

  .modal .modal-body {
    padding: 0.85rem;
  }
}
