/* =====================================================================
   Cat Collection — trophy cards, silhouettes, progress bars
   ===================================================================== */

.cat-collection__header {
  margin-bottom: 0;
}

.cat-collection__subtitle {
  font-size: var(--text-sm);
  color: var(--neutral-accent);
  margin-top: var(--size-1);
}

.cat-collection__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--size-3);
}

@media (min-width: 768px) {
  .cat-collection__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--size-4);
  }
}

@media (min-width: 1100px) {
  .cat-collection__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* === Trophy Card === */

.cat-card {
  border-radius: var(--rounded-lg);
  padding: var(--size-3);
  background: #fff;
  border: 1px solid var(--neutral-accent);
  display: flex;
  flex-direction: column;
  gap: var(--size-2);
  position: relative;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

@media (min-width: 768px) {
  .cat-card {
    padding: var(--size-4);
    gap: var(--size-3);
  }
}

.cat-card--active {
  border: 2px solid var(--happy-primary);
}

.cat-card--owned {
  border: 1px solid var(--neutral-accent);
  cursor: pointer;
}

.cat-card--owned:hover {
  border-color: var(--neutral-primary);
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.06);
  transform: translateY(-1px);
}

.cat-card--owned:focus-visible {
  outline: 2px solid var(--neutral-primary);
  outline-offset: 2px;
}

.cat-card--locked {
  border: 1px dashed var(--neutral-accent);
}

.cat-card--pro-locked {
  border: 2px dashed var(--pro-gold);
  cursor: pointer;
}

.cat-card--pro-locked:focus-visible {
  outline: 2px solid var(--pro-gold);
  outline-offset: 2px;
}

/* === Cat Illustration Area === */

.cat-card__image-wrap {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rounded-md);
  overflow: hidden;
  background: var(--neutral-bg);
}

.cat-card__image {
  width: 72px;
  height: 72px;
  border-radius: var(--rounded-md);
  object-fit: contain;
}

@media (min-width: 768px) {
  .cat-card__image {
    width: 96px;
    height: 96px;
  }
}

.cat--locked {
  filter: brightness(0) blur(2px);
}

/* === Card Body === */

.cat-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--size-1);
  flex: 1;
}

.cat-card__name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--size-1);
}

.cat-card__name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--neutral-text);
  line-height: 1.2;
}

.cat-card__active-badge {
  font-size: 0.7rem;
  color: var(--happy-primary);
  font-weight: var(--font-bold);
}

.cat-card__type-badge {
  font-size: 0.65rem;
  color: var(--neutral-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cat-card__description {
  font-size: 0.78rem;
  color: var(--neutral-text);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  overflow: hidden;
  max-height: 4.5em;
  transition: max-height 300ms ease-in-out;
  will-change: max-height;
}

.cat-card--expanded .cat-card__description {
  line-clamp: initial;
  -webkit-line-clamp: initial;
  overflow: visible;
  max-height: 22rem;
}

@media (hover: hover) and (pointer: fine) {
  .cat-card:hover .cat-card__description {
    line-clamp: initial;
    -webkit-line-clamp: initial;
    overflow: visible;
    max-height: 22rem;
  }
}

.cat-card__unlock-condition {
  font-size: 0.65rem;
  color: var(--neutral-accent);
  line-height: 1.3;
}

.cat-card__unlock-condition--pro {
  color: var(--pro-gold);
  font-weight: var(--font-semibold);
}

.cat-card__countdown {
  font-size: 0.65rem;
  color: var(--info);
}

/* === Progress Bar === */

.cat-card__progress-wrap {
  margin-top: var(--size-1);
}

.cat-card__progress-bar {
  height: 4px;
  background: var(--neutral-bg);
  border-radius: var(--rounded-full);
  overflow: hidden;
}

.cat-card__progress-fill {
  height: 100%;
  background: var(--streak-active);
  border-radius: var(--rounded-full);
  transition: width 0.4s ease-out;
}

.cat-card__progress-label {
  font-size: 0.6rem;
  color: var(--neutral-accent);
  margin-top: var(--size-0_5);
  text-align: right;
}

.cat-card__confirm {
  margin-top: var(--size-2);
  padding-top: var(--size-2);
  border-top: 1px solid var(--neutral-bg);
  display: flex;
  flex-direction: column;
  gap: var(--size-2);
}

.cat-card__confirm .button_to,
.cat-card__confirm .btn {
  width: 100%;
}

.cat-card__confirm-cancel {
  border: 0;
  background: transparent;
  color: var(--neutral-accent);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: var(--size-1);
}

/* === Selection Confirmation Bottom Sheet === */

.cat-confirm-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.cat-confirm-sheet__overlay {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.4);
}

.cat-confirm-sheet__panel {
  position: relative;
  background: var(--neutral-bg);
  border-radius: var(--rounded-lg) var(--rounded-lg) 0 0;
  padding: var(--size-6) var(--size-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--size-4);
  animation: sheet-slide-up 250ms ease-out forwards;
}

@keyframes sheet-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.cat-confirm-sheet__handle {
  width: 2.5rem;
  height: 4px;
  background: var(--neutral-accent);
  border-radius: var(--rounded-full);
  margin-bottom: var(--size-2);
}

.cat-confirm-sheet__title {
  font-size: 1rem;
  font-weight: var(--font-bold);
  color: var(--neutral-text);
  text-align: center;
}

.cat-confirm-sheet__body {
  font-size: var(--text-sm);
  color: var(--neutral-accent);
  text-align: center;
  line-height: 1.5;
}

.cat-confirm-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: var(--size-3);
  width: 100%;
}

.cat-confirm-sheet__cancel {
  background: none;
  border: none;
  color: var(--neutral-accent);
  font-size: var(--text-sm);
  cursor: pointer;
  text-align: center;
  padding: var(--size-2);
}
