/* Container */
.jalpi-wrap { max-width: 1200px; margin: 0 auto; padding: 16px; }

/* Top controls */
.jalpi-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.jalpi-left { display: flex; align-items: center; gap: 10px; }
.jalpi-right { display: flex; align-items: center; gap: 8px; }
.jalpi-right .jalpi-country-label { font-weight: 600; }

/* Tabs (Monthly/Yearly) */
.jalpi-tabs {
  position: relative;
  display: inline-flex;
  background: #f4f5f7;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.jalpi-tab {
  position: relative;
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: color 160ms ease, transform 120ms ease;
  color: #444;
}
.jalpi-tab:hover { transform: translateY(-1px); }
.jalpi-tab.is-active { color: #0b5fff; }

/* Sliding indicator */
.jalpi-tab-indicator {
  position: absolute;
  top: 4px; left: 4px;
  height: calc(100% - 8px);
  width: 0px;
  background: #e7efff; /* active highlight */
  border-radius: 8px;
  z-index: 0;
  transition: transform 220ms ease, width 220ms ease, background 220ms ease;
}
.jalpi-tab, .jalpi-tab * { position: relative; z-index: 1; }

/* Country picker */
.jalpi-country-picker {
  position: relative;
  display: inline-block;
}
.jalpi-country-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 10px;
  background: #fff; cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.jalpi-country-toggle .flag svg { display: block; border-radius: 3px; }
.jalpi-country-text { font-weight: 600; color: #333; }
.jalpi-caret { font-size: 12px; color: #666; }

.jalpi-country-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20;
  min-width: 200px; padding: 6px;
  background: #fff; border: 1px solid #e5e5e5; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  display: none;
}
.jalpi-country-menu.open { display: block; animation: jalpiFadeIn 140ms ease; }
@keyframes jalpiFadeIn { from { opacity: 0; transform: translateY(-4px);} to { opacity: 1; transform: translateY(0);} }

.jalpi-country-option {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.jalpi-country-option:hover { background: #f6f7f9; }
.jalpi-country-option[aria-selected="true"] { background: #e7efff; color: #0b5fff; }

.flag svg { display:block; width:20px; height:14px; border-radius: 3px; }

/* Hide the hidden input but keep it accessible to JS */
#jalpi-country { display: none; }

/* Description */
.jalpi-description { margin: 8px 0 16px; }

/* Grid */
.jalpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1024px) {
  .jalpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .jalpi-grid { grid-template-columns: 1fr; }
}

/* Slots */
.jalpi-slot { width: 100%; }

/* Optional baseline for buttons (Elementor likely overrides) */
.jalpi-grid .btn, .jalpi-grid a.button {
  display: inline-block; padding: 10px 16px; text-decoration: none; border-radius: 8px;
  border: 1px solid #ccc;
}
/* Show the correct current flag based on data-flag */
.flag-current .svg { display: none; }
.flag-current[data-flag="US"] .svg-us { display: inline-block; }
.flag-current[data-flag="IN"] .svg-in { display: inline-block; }

.jalpi-grid.new-price {
    display: flex !important;
}



.jalpi-tab.is-active:hover {
    color: white;
}
