/* Bubble slide-down entrance for .packages when their card opens */
@keyframes bubbleSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-18px);
  }
  60% {
    opacity: 1;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

#tog-mtn-express:checked ~ .second-bar .packages,
#tog-mtn:checked ~ .second-bar .packages,
#tog-telecel:checked ~ .second-bar .packages,
#tog-airteltigo:checked ~ .second-bar .packages {
  animation: bubbleSlideDown 0.45s ease;
}
#tog-mtn-express:checked ~ .second-bar .packages:nth-child(1),
#tog-mtn:checked ~ .second-bar .packages:nth-child(1),
#tog-telecel:checked ~ .second-bar .packages:nth-child(1),
#tog-airteltigo:checked ~ .second-bar .packages:nth-child(1) { animation-delay: 0.02s; }
#tog-mtn-express:checked ~ .second-bar .packages:nth-child(2),
#tog-mtn:checked ~ .second-bar .packages:nth-child(2),
#tog-telecel:checked ~ .second-bar .packages:nth-child(2),
#tog-airteltigo:checked ~ .second-bar .packages:nth-child(2) { animation-delay: 0.06s; }
#tog-mtn-express:checked ~ .second-bar .packages:nth-child(3),
#tog-mtn:checked ~ .second-bar .packages:nth-child(3),
#tog-telecel:checked ~ .second-bar .packages:nth-child(3),
#tog-airteltigo:checked ~ .second-bar .packages:nth-child(3) { animation-delay: 0.10s; }
#tog-mtn-express:checked ~ .second-bar .packages:nth-child(4),
#tog-mtn:checked ~ .second-bar .packages:nth-child(4),
#tog-telecel:checked ~ .second-bar .packages:nth-child(4),
#tog-airteltigo:checked ~ .second-bar .packages:nth-child(4) { animation-delay: 0.14s; }
#tog-mtn-express:checked ~ .second-bar .packages:nth-child(n+5),
#tog-mtn:checked ~ .second-bar .packages:nth-child(n+5),
#tog-telecel:checked ~ .second-bar .packages:nth-child(n+5),
#tog-airteltigo:checked ~ .second-bar .packages:nth-child(n+5) { animation-delay: 0.18s; }

/* ===============================
   CARD PARENT
================================ */
.card-parent {
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.available-network {
  position: absolute;
  top: -35px;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 40px; 
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
  color: #2e7d32;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 16px;
  white-space: nowrap;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
  transition: all 0.25s ease;
}


.available-network:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(46, 125, 50, 0.25);
  background: linear-gradient(135deg, #e0f7e0 0%, #c8e6c9 100%);
}

.available-network svg {
  transition: transform 0.2s ease;
}

.available-network:hover svg {
  transform: scale(1.1);
}



/* ===============================
   CARD HEADER
================================ */
.first-bar {
  border-radius: 25px 25px 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  padding: 10px 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.mostBanner {
  background: red;    /* richer red */
  color: var(--white);
  position: absolute;
  top: 17px;
  right: -43px;           /* fine-tuned for perfect diagonal */
  width: 140px;           /* slightly wider for longer text */
  text-align: center;
  transform: rotate(45deg);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 0;
  z-index: 1;
  letter-spacing: 0.5px;
  
}
#tog-mtn-express:checked ~ .first-bar,
#tog-mtn:checked ~ .first-bar,
#tog-telecel:checked ~ .first-bar,
#tog-airteltigo:checked ~ .first-bar{
  border-radius: 6px 6px 30px 30px;
}
.first-bar:after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 10px solid rgb(255,255,255,0.15);
}
.first-bar:before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgb(255,255,255,0.15);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 50px;
  object-fit: cover;
}
.card-name {
  color: white;
  font-size: 1em;
  font-weight: 800;
  border-radius: 50px;
  padding: 5px 16px;
}

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

/* ===============================
   COLLAPSIBLE CONTENT
================================ */

/* ===============================
   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: visibility 0.3s ease,max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease, overflow 0s linear 0.3s;
  overflow: hidden;
  transform: transformY(20px);
  visibility:  hidden;
}

/* Show when checkbox checked */
#tog-mtn-express:checked ~ .second-bar,
#tog-mtn:checked ~ .second-bar,
#tog-telecel:checked ~ .second-bar,
#tog-airteltigo:checked ~ .second-bar {
  visibility:  visible;
  max-height: 2000px;
  opacity: 1;
  padding: 10px 20px;
  margin: 5px auto;
  overflow: visible;
  transition: visibility 0.3s ease,max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease, overflow 0s linear 0s;
}



/* ===============================
   TOGGLE BUTTON (ENHANCED)
================================ */
.card-btn {
  border-radius: 0 0 25px 25px;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  padding: 10px 10px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  transition: all 0.25s ease;
 /* box-shadow: 0 -2px 8px rgba(0,0,0,0.05), 0 2px 6px rgba(0,0,0,0.1); */
  position: relative;
  z-index: 1;
  
}


#tog-mtn-express:checked ~ .card-btn,
#tog-mtn:checked ~ .card-btn,
#tog-telecel:checked ~ .card-btn,
#tog-airteltigo:checked ~ .card-btn {
  border-radius: 30px;
}

.card-btn:hover {
  background: linear-gradient(135deg, var(--charcoal-d), #222);
  
  
}

.orders-active {
  border-radius: 40px;
  padding: 6px;
 /* background: rgba(76, 175, 80, 0.18);
  border: 1px solid rgba(76, 175, 80, 0.3); */
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  font-weight: 600;
  color: #2ecc71;
  transition: all 0.2s;
}

.card-btn:hover .orders-active {
  background: rgba(76, 175, 80, 0.25);
  border-color: rgba(76, 175, 80, 0.5);
}

.orders-active svg {
  width: 18px;
  height: 18px;
  color: #2ecc71;
  background: rgba(34, 197, 94, 0.2);
  padding: 4px;
  border-radius: 50%;
}
.orders-actived {
  background: rgba(244, 67, 54, 0.18);
  border-color: rgba(244, 67, 54, 0.3);
  color: #f44336;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
  border-radius: 40px;
  padding: 6px 14px;
}

.orders-actived svg {
  padding: 4px;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  color: #f44336;
  background: rgba(244, 67, 54, 0.2);
}

.card-btn:hover .orders-actived {
  background: rgba(244, 67, 54, 0.25);
  border-color: rgba(244, 67, 54, 0.5);
}

.card-btn-box {
  border-radius: 40px;
  background: #222;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  position: absolute;
  bottom: 0;
  right: 0;
  border: 6px solid var(--white);
}

.card-btn-box::after{
  content: '';
  position: absolute;
  top: -25.5px;
  right: -5.6px;
  width: 25px;
  height: 20px;
  border-bottom-right-radius: 50px;
  box-shadow: 13px 13px 0 12px var(--white);
  z-index: -1;
  transition: all .22s ease;
} 
.card-btn-box::before{
  content: '';
  position: absolute;
  left: -25.5px;
  bottom: -5.6px;
  width: 20px;
  height: 25px;
  border-bottom-right-radius: 50px;
   box-shadow: 13px 13px 0 12px var(--white);
  z-index: -1;
  transition: all .22s ease;
} 
.dark-mode .card-btn-box {
  border-color: var(--dm-card);
}
.dark-mode .card-btn-box::after,
.dark-mode .card-btn-box::before {
  box-shadow: 13px 13px 0 12px var(--dm-card) ;
}


.card-btn-icon {
  font-size: 1.4rem;
  color: var(--gold);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  
}
#tog-mtn-express:checked ~ .card-btn .card-btn-icon,
#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 {
  display: flex;
  flex-direction: column;
  justify-content: center;
 /* border: 1px solid rgb(0,0,0,0.124); */
  border-radius: 18px;
  align-items: center;
  transition: filter 0.3s ease,
              transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  width: 100%;
  will-change: transform, filter;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
  
}

/* Expanded packages */

/* Active: blur others, keep active sharp */
.second-bar:has(.packages.active) .packages:not(.active) {
  filter: blur(2px);
}
.packages.active {
  position: relative;
  filter: blur(0);
  transform: scale(1.09);
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0);
}
.packages.active::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  background: var(--gold);
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.packages.active::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: -10px;
  background: #222;
  width: 5px;
  height: 25px;
  border-radius:0 50px 50px 0;
  z-index: 100;
  display: none;
}

.card-mtn-express .packages.active::before {
  background: ;
}
.card-mtn .packages.active::before {
  background: var(--gold);
}
.card-telecel .packages.active::before {
  background: red;
}
.card-airteltigo .packages.active::before {
  background: linear-gradient(90deg, red, #133e7c);
}

/* Common transition — handled above */

/* ===============================
   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;
  border-radius: 18px 18px 0px 0px;

}
.packages.active .package-column1{
  
}

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

.regular-box {
  display: flex;
  flex-direction: row;
  background: var(--white);
  margin: 0;
  padding: 2px;
  border-radius: 25px;
  
  }

.regular-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--charcoal);
  padding: 0px 10px;
  color: var(--white);
  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: var(--charcoal);
  white-space: nowrap;
  
  text-overflow: ellipsis;
  min-width: 0;
}

/* ===============================
   PACKAGE COLUMN 2 (unchanged, but safe)
================================ */
.package-column2 {
  
  border-radius: 0;
  padding: 5px 0px;
  margin: 0;
  width: 100%;
  height: fit-content;
  background: transparent;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  gap: 10px;
  border-radius: 0px 0px 18px 18px;
  
}
.packages.active .package-column2{
  z-index: 10;
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.14);
}

.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;
  border: none;
  border-left: 3px solid #ddd; /* increased thickness */
  border-radius: 4px;
}


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

/* ===============================
   PACKAGE COLUMN 3 (EXPANDABLE)
================================ */
.package-column3 {
  background: var(--white);
  width: 100%;
  
  max-height: 0;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              padding 0.35s ease;
  margin: 0;
  padding: 0px;
  box-sizing: border-box;
  border-radius: 18px;
}


/* Show smoothly when active */
.packages.active .package-column3 {
  max-height: 200px;
  opacity: 1;
  margin-top: 4px;
 box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.14);
  z-index: 10;
}

.package-column2{
  position: relative;
  z-index: 2;
}

.package-column3{
  position: relative;
  z-index: 1;
}

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

.validation-icon {
  position: absolute;
  left: -10px;
  width: 5px;
  pointer-events: none;
  border-radius: 0px 50px 50px 0px;
  height: 60%;
  transition: background-color 0.2s ease;
  /* Remove the static background: rgb(0,0,0,0.125); if you want the dynamic colors */
}

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

.validation-icon.invalid {
  background: rgba(244, 67, 54, 1); /* 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: 800;
  color: var(--charcoal);
  font-family: "Nunito";
  background: transparent;
  border-radius: 50px;
  padding: 1px;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

/* Number doesn't match the selected network's prefix — stays red until
   corrected (not a one-time flash), same red used by .validation-icon.invalid. */
.package-input.network-mismatch {
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 1);
  background: rgba(244, 67, 54, 0.08);
  border-radius: 50px;
}

.package-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  border-radius: 25px;
  border: none;
  background: linear-gradient(135deg,#111,var(--charcoal));
  color: var(--white);
  transition: background 0.2s ease;
  white-space: nowrap;
  font-weight: 900;
  font-size: 0.7rem;
  height: 100%;
  padding: 2px 2px 2px 10px;
  font-family: "Outfit";
  cursor: pointer;
}

.package-btn:hover {
  background: #222222;
}
.order-arrow {
  height: 90%;
  aspect-ratio: 1;
  background: var(--white);
  font-size: 0.7rem;
  color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transform: translateX(-70px) rotate(180deg);
  pointer-events: none;
  transition: transform 0.8s ease;
  box-shadow: 0px 0px 6px rgba(0, 0, 0, 1);
}


.packages.active .order-arrow {
  transform: translateX(0px) rotate(180deg); /* slides right */
  transition: transform 0.8s ease;
}

/* ===============================
   NETWORK SPECIFIC STYLES
================================ */

.card-mtn-express .packages .package-column1 {
  background-color: #B0b0b0;
  color: var(--charcoal);
}

/* MTN */
.card-mtn .packages .package-column1 {
  background-color: #FFCB05;
  color: var(--charcoal);
}





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




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




/* ===============================
   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.08);
  box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.12);
}
}
/* ── NETWORK UNAVAILABLE BANNER (admin-controlled toggle) ── */
.network-unavailable-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 4px 0;
}

.network-unavailable-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.network-unavailable-banner p {
  margin: 0;
  font-size: 0.85rem;
  color: #b91c1c;
  line-height: 1.4;
}
