@layer components;

/* =================== TEST PACKAGES GRID =================== */

.mod-test-packages-grid {
  container-type: inline-size;
  padding-top: 1em;
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-8);                     
  justify-content: center;
}

/* card */
.test-package__box {
  border-radius: var(--radius-md);      
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column;
  width: calc(25% - var(--spacing-8));     
  background: var(--white);
  transition: box-shadow var(--transition-medium);
}

.test-package__box > * { padding: var(--spacing-4); }   

.test-package__box h3 {
  margin: 0; padding: 0;
  font-size: var( --font-size-h5);              
  line-height: 1.2;
  font-weight: var(--font-weight-semibold);
  text-align: center;
}

/* header band */
.package_title {
  background-color: var(--secondary-color-light-10); 
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .3rem 1rem;
  height: 60px;
}

/* hover */
.test-package__box:hover { box-shadow: var(--box-shadow-hover); }

/* included tests panel */
.package_included_tests {
  padding: .5rem 1rem;
  margin: .5rem;
  border: 1px solid var(--secondary-color-light-10);
  border-radius: var(--radius-md);
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--secondary-color-light-10) transparent;
  scroll-margin-right: 10px;
}

.package_included_tests::-webkit-scrollbar { width: 5px; }
.package_included_tests::-webkit-scrollbar-track { background: transparent; }
.package_included_tests::-webkit-scrollbar-thumb {
  background-color: var(--secondary-color-light-10);
  border-radius: 20px;
  border: transparent;
}

/* prices */
.package_price {
  font-size: 1.8rem;
  font-weight: var(--font-weight-semibold);
  color: var(--primary-color);         
  text-align: center;
  padding-bottom: 0;
}
.package_price::after {
  content: 'EUR';
  font-size: .7rem;
  margin-left: 3px;
}

.package_old_price {
  font-size: 1rem;
  font-weight: 400;
  color: var(--light-grey);            
  text-align: center;
  padding: 0;
  text-decoration: line-through;
}
.package_old_price:not(:empty)::after {
  content: 'EUR';
  font-size: .7rem;
  margin-left: 3px;
  text-decoration: line-through;
}

/* meta */
.package_tests_number {
  color: var(--primary-color);
  text-transform: uppercase;
  font-size: .85rem;
  font-weight: var(--font-weight-semibold);
  padding-bottom: 0;
}
.package_tests_number::after {
  content:'PREISKAV';
  margin-left: 3px;
}

/* lists inside panel */
.package_included_tests ul { list-style: none; margin: 0; padding: 0; }
.package_included_tests li {
  font-size: .85rem;
  color: var(--dark-grey);
}
.package_included_tests li::before {
  content: '';
  background-image: url('/images/icons/circle-check-solid-orange.png');
  background-size: contain;
  background-repeat: no-repeat;
  width: 10px; height: 10px;
  display: inline-block;
  margin-right: .7rem;
  opacity: .7;
}
.package_included_tests li::marker { font-size: 0; }

/* description */
.package_description * {
  font-size: .85rem;
  color: var(--light-grey);
  font-style: italic;
}
.package_description {
  margin-bottom: auto;
  padding-bottom: 0;
}

/* footer link */
.package_link a {
  padding: .3rem;
  background-color: var(--secondary-color-light-10); 
  border-radius: 10rem;
  width: 100%;
  display: block;
  margin: 0 auto;
  text-align: center;
  font-weight: var(--font-weight-medium);
  color: var(--primary-color);
  text-decoration: none;
}

/* =============== RESPONSIVE VIA CONTAINER QUERIES (desktop -> down) =============== */
/* 4 → 3 cards */
@container (max-width: 1150px) {
  .test-package__box { width: calc(33% - var(--spacing-8)); }
}
/* 3 → 2 cards */
@container (max-width: 850px) {
  .test-package__box { width: calc(50% - var(--spacing-8)); }
}
/* 2 → 1 card */
@container (max-width: 550px) {
  .test-package__box { width: 90%; }
}

