/* ===============================
   CARD PARENT
================================ */
.card-parent {
  margin: 0;
  padding: 0;
  border-radius: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ===============================
   CARD HEADER
================================ */
.first-bar {
  border-radius: 15px 15px 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  padding: 10px 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.card-name {
  margin: 0;
  color: white;
  font-size: 20px;
  font-weight: 600;
}

/* ===============================
   NETWORK COLORS
================================ */
.mtn { background: #ffcc00; }
.telecel { background: red; }
.airteltigo { background: linear-gradient(90deg, red, #133e7c); }

/* ===============================
   COLLAPSIBLE CONTENT
================================ */
.second-bar {
  margin: 0;
  padding: 0;
  gap: 15px;
  max-height: 0;
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
  overflow: hidden;
}

/* Show when checkbox checked */
#tog-mtn:checked ~ .second-bar,
#tog-telecel:checked ~ .second-bar,
#tog-airteltigo:checked ~ .second-bar {
  max-height: 2000px;
  opacity: 1;
  padding: 10px 20px;
}

/* ===============================
   TOGGLE BUTTON
================================ */
.card-btn {
  border-radius: 0 0 15px 15px;
  background: #444;
  padding: 12px;
  text-align: center;
  cursor: pointer;
}

.card-btn-icon {
  font-size: 1.6rem;
  color: #fff;
  transition: transform 0.3s ease;
  margin: 0;
}

#tog-mtn:checked ~ .card-btn .card-btn-icon,
#tog-telecel:checked ~ .card-btn .card-btn-icon,
#tog-airteltigo:checked ~ .card-btn .card-btn-icon {
  transform: rotate(180deg);
}

/* ===============================
   PACKAGES
================================ */
.packages {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  justify-content: center;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
  align-items: center;
  transition: max-height 0.2s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.3s ease,
              padding 0.3s ease,
              transform 0.2s ease;
  overflow-y:  hidden;
  width: 100%;
}

/* Expanded packages */

/* Active: blur others, keep active sharp */
.second-bar:has(.packages.active) .packages:not(.active) {
  filter: blur(2px);
}
.packages.active {
  filter: blur(0);
  transform: scale(1.1);
}



/* Common transition */
.packages {
  transition: filter 0.2s ease, transform 0.2s ease;
}

/* ===============================
   PACKAGE COLUMN 1
================================ */
.package-column1 {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  width: 100%;
  padding: 13px 15px;
  box-sizing: border-box;
}

.packages-name {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.regular-box {
  display: flex;
  flex-direction: row;
  background: #fff;
  margin: 0;
  padding: 2px;
  border-radius: 25px;
  
  }

.regular-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #444;
  margin: 0;
  padding: 0px 10px;
  color: #fff;
  font-size: 1rem;
  border-radius: 25px;
  
}

.packages-description {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0 5px;
  font-weight: 600;
  font-size: 0.7rem;
  color: #444;
  white-space: nowrap;
  
  text-overflow: ellipsis;
  min-width: 0;
}

/* ===============================
   PACKAGE COLUMN 2 (unchanged, but safe)
================================ */
.package-column2 {
  border-radius: 0;
  padding: 3px 0px;
  margin: 0;
  width: 100%;
  height: fit-content;
  background: transparent;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  gap: 10px;
}

.package-column2-label {
  color: #777;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.package-text-value {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #222;
}

hr {
  height: 20px;
  margin: 0;
  border: none;
  border-left: 1px solid #ddd;
}

.text-box {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 3px;
  margin: 0px;
}

/* ===============================
   PACKAGE COLUMN 3 (EXPANDABLE)
================================ */
.package-column3 {
  background: #fff;
  width: 100%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;                /* ← hides content when collapsed */
  transition: max-height 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.35s ease,
              padding 0.35s
             ;
  margin: 0;
  padding: 5px 5px;
  box-sizing: border-box;
  border-radius: 1px;
}

/* Show smoothly when active */
.packages.active .package-column3 {
  max-height: 80px;
  opacity: 1;
  
}

.inner-outline {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  margin: 0px;
  width: 100%;
  padding: 2px 2px 2px 2px;
  height: 35px;                     /* fixed height for children to fill */
  overflow: hidden;   
  box-sizing: border-box;
  border: 0.5px solid rgb(0, 0, 0, 0.3);
  box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);
  gap: 2px;
}
.input-holder {
  display: flex;
  flex-direction: row;
  background: rgb(0, 0, 0, 0.05);
  border-radius: 50px;
  height: 100%;
  width: 100%;
}

.validation-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border-radius: 50px;
  padding: 2px 5px;
  font-size: 1.2rem;
  margin: 1px;
  width: fit-content
  transition: background-color 0.2s ease;
  /* Remove the static background: rgb(0,0,0,0.125); if you want the dynamic colors */
}

.validation-icon.svg-valid {
  background: rgba(76, 175, 80, 0.25); /* light green background */
}

.validation-icon.svg-invalid {
  background: rgba(244, 67, 54, 0.25); /* light red background */
}

.package-input {
  border: none;
  outline: none;
  width: 100%;
  height: 100%;                      /* fill parent height */
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: Nunito;
  background: transparent;
  border-radius: 50px;
  padding: 1px;
}

.package-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  border: none;
  background: #444;
  color: #ffffff;
  transition: background 0.2s ease;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.8rem;
  height: 100%;
  padding: 0 1.2rem;
}

.package-btn:hover {
  background: #222222;
}

/* ===============================
   NETWORK SPECIFIC STYLES
================================ */
/* MTN */
.card-mtn .packages .package-column1 {
  background-color: #FFCB05;
  color: #444;
}

#mtn-products { 
  border-left: 2px solid #ffcc00;
  border-right: 2px solid #ffcc00;
}



/* Telecel */
.card-telecel .packages .package-column1 {
  background-color: red;
  color: white;
}

#telecel-products {
  border-left: 2px solid red;
  border-right: 2px solid red;
}



/* AirtelTigo */
.card-airteltigo .packages .package-column1 {
  background: linear-gradient(90deg, red, #133e7c);
  color: white;
  white-space: nowrap;
}

#airteltigo-products {
  border-left: 2px solid red;
  border-right: 2px solid #133e7c;
}



/* ===============================
   RESPONSIVE
================================ */
@media (min-width: 768px) {
  /* Add desktop styles here if needed */
  .card-parent {
    max-width: 500px;
    margin: 0 auto;
  }
  /* Hover: blur non‑hovered (and optionally exclude active) */
.second-bar:has(.packages:hover) .packages:not(:hover):not(.active) {
  filter: blur(2px);
}
.packages:hover {
  filter: blur(0);
  transform: scale(1.1);
}
}