/* Regions Flags Background color.*/
/* For search-esimcountries.js and for single-region-template.php */

.region-img {
  background-color: var(--e-global-color-primary) !important;
}

.result-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 0.0625rem solid #ddd;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
}

.result-item:hover {
  background: var(--e-global-color-primary);
}

.country-flag {
  width: 1.875rem;
  height: auto;
  margin-right: 1.25rem;
  border-radius: 0.1875rem;
}

.country-name {
  font-size: 1rem;
  font-weight: 500 !important;
  color: #000000;
  line-height: 1em;
}

.no-results {
  color: #505050;
  text-align: center;
  padding: 0.625rem;
}

/* New CSS */
.custom-esims-search-bar {
  width: 100%;
  /* min-width: 100%; */
  margin: 0;
}

.custom-esims-search-bar form {
  width: 100%;
  margin: 0;
}

.custom-esims-search-bar button {
  background-color: var(--e-global-color-primary);
  color: #fff;
  border: none;
  padding: 0.5625rem;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 1rem;
  line-height: 1em;
}

.custom-esims-search-bar button:hover {
  background-color: var(--e-global-color-primary);
}



/* New Styles */
.search-box {
  display: flex;
  align-items: center;
  background: white;
  justify-content: space-between;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0.5rem 1.25rem 0 #0000001A;
  padding: 0.9375rem;
  width: 100%;
  box-sizing: border-box;
}

.search-box input {
  flex: 1;
  padding: 0.9375rem 1.5625rem;
  font-size: 1.125rem;
  border: none;
  outline: none;
  font-family: var(--e-global-typography-primary-font-family);
  font-weight: 400;
  line-height: 1em;
  border-radius: 0;
  height: 3.125rem;
  color: #000;
}

.search-box input::placeholder {
  color: #21272A;
}

.search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #474AD2;
  color: #ffffff;
  border: none;
  padding: 0.5625rem;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 1rem;
  line-height: 1em;
}

.search-icon {
  width: 2rem;
  height: 2rem;
}

/* Style for Tabs */
/* Wrapper */
.esim-wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3.75rem 0;
  font-family: var(--e-global-typography-primary-font-family);
}

/* Header row: title left, tabs right */
.esim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 3.75rem;
}

.esim-title h2 {
  font-weight: 700;
  font-size: 2rem;
  line-height: 1em;
  margin: 0 0 1rem;
  color: #000;
}

.esim-title p {
  margin: 0;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1em;
  color: #666666;
}

.esim-tabs {
  display: flex;
  gap: 1.25rem;
}

.esim-tabs button {
  background: none;
  background-color: transparent;
  border: none;
  font-size: 1rem;
  padding: 0.625rem 0.75rem;
  cursor: pointer;
  color: #000;
  line-height: 1em;
  border-bottom: 0.0625rem solid transparent;
  font-weight: 500;
  border-radius: 0;
}

.esim-tabs button:hover {
  color: var(--e-global-color-primary);
}

.esim-tab.active,
.esim-tabs button:hover {
  color: var(--e-global-color-primary);
  border-color: var(--e-global-color-primary);
  font-weight: 700;
  background-color: transparent !important;
}

/* Hide all tab content wrappers by default */
.tab-content-wrapper {
  display: none;
}

/* Show active tab content wrapper */
.tab-content-wrapper.active {
  display: block;
}

/* Grid layout: 4 per row */
.esim-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.esim-card {
  display: flex;
  align-items: center;
  background: #fff;
  border: 0.0625rem solid #E6E6E6;
  padding: 1rem 1rem;
  border-radius: 10px;
  transition: all 0.3s;
  cursor: pointer;
}

.esim-card:hover {
  border-color: var(--e-global-color-primary);
  box-shadow: 0 0 0 0.125rem rgba(59, 73, 223, 0.1);
}

.esim-card img {
    width: 50px;
    height: 50px;
    margin-right: 5px;
    object-fit: cover;
    border-radius: 50%;
}

.esim-card[data-tab="regions"] img {
  border-radius: 50%;
}

.esim-card-content {
  display: flex;
  flex-direction: column; /* Stack elements vertically */
  align-items: flex-start;
  justify-content: center;
}

.esim-card-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  margin: 0;
  line-height: 1.3;
}

.esim-packages {
  font-size: 13px;
  font-weight: 500;
  color: #666666;
  display: flex;
  align-items: center;
  justify-content: space-between;  /* Align text and arrow */
  gap: 0.25rem; 
  width: 100%;
  margin-top: 0.25rem;
}


.esim-packages .arrow {
  color: var(--e-global-color-primary);
  transition: transform 0.2s ease;
  display: flex;
  margin-left: auto;
  align-items: center;         /* ✅ Align arrow with text */
}

.esim-card:hover .arrow {
  transform: translateX(0.125rem);
  color: #3b49df;
}

.esim-packages svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

/* Button wrapper */
.esim-button-wrapper {
  grid-column: 1 / -1;
  margin-top: 1.875rem;
  text-align: center;
}

.esim-button-wrapper button {
  background: var(--e-global-color-primary) !important;
  border: 0.0625rem solid var(--e-global-color-accent);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.esim-button-wrapper button:hover,.esim-button-wrapper button:focus {
  background-color: var(--e-global-color-primary);
  background: var(--e-global-color-primary);
  color: #fff;
}

.hidden-card {
  display: none;
}

/* .back-button,button.back-button {
  background: transparent !important;
  margin-bottom: 1rem !important;
  border-radius: 1rem !important;
  border: 0.0625rem solid var(--e-global-color-accent);
  font-size: 1rem !important;
  padding: 1rem 1.25rem !important;
  line-height: 1em !important;
  outline: none !important;
  color: var(--e-global-color-accent);
}

.back-button:hover {
  background-color: var(--e-global-color-accent) !important;
  background: var(--e-global-color-accent) !important;
  color:#fff;
}

.package-grid {
  width: 100%;
  max-width: 1400px;
  margin: 0.75rem auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 0 1rem;
}

.package-card {
  background: linear-gradient(172.82deg, #70A7EC 4.39%, #FFFFFF 95.61%);
  border-radius: 20px;
  box-shadow: 0 5px 5px rgb(0 0 0 / 4%);
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
  transition: all 0.3s ease;
}

.package-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

/* Package Card Header */
.package-card .esim-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.package-card .esim-card-header img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.package-card .country-name {
  font-size: 20px;
  font-weight: 600;
  color: #000000;
  font-family: var(--e-global-typography-primary-font-family);
  margin: 0;
  line-height: 1.2;
}

.package-card .country-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  font-family: var(--e-global-typography-text-font-family);
  margin: 0;
}

/* Package Box Container */
.package-card .package-box {
  background: linear-gradient(191.37deg, #FFFFFF 8.35%, #FFFFFF 91.65%);
  border-radius: 20px;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Data Plan */
.package-card .data-plan {
  font-size: 40px;
  font-weight: 600;
  font-family: var(--e-global-typography-primary-font-family);
  background: linear-gradient(90deg, #000000 0%, #2e7ad8 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  line-height: 1.2;
}

.package-card .data-plan span {
  font-size: 16px;
  font-weight: 500;
  font-family: var(--e-global-typography-text-font-family);
  color: #666666;
  -webkit-text-fill-color: initial;
  display: block;
}

.package-card .best-plan {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--e-global-typography-primary-font-family);
  color: #0B1B29;
  margin: 0;
  margin-top: -30px;
}

/* Features List */
.package-card .features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.package-card .features li {
  list-style: none;
  font-size: 14px;
  font-weight: 400;
  font-family: var(--e-global-typography-text-font-family);
  color: #666666;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.package-card .features li::before {
  content: "\2714";
  background: #2e7ad8;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Card Footer - Buttons */
.package-card .esim-card-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

/* Get eSIM Button */
.package-card .get-esim-btn {
  background: #0B1B29;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--e-global-typography-primary-font-family);
  padding: 10px 65px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

/* Get eSIM Hover */
.package-card .get-esim-btn:hover {
  background: #152b3d;
  color: #ffffff;
  text-decoration: none;
}

/* Price Button */
.package-card .price-btn {
  background: #2E7AD8;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--e-global-typography-primary-font-family);
  padding: 10px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
}

.badge {
  position: absolute;
  top: -15px;
  right: 15px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.badge-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.flag-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flag-container img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  object-fit: cover;
}

.flag-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  z-index: 2;
  border: 2px solid #fff;
}

.flag-circle img {
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
}

.package-card h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  color: #0B1B29;
  margin: 0;
  padding: 0;
}

.package-details {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--e-global-color-primary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.package-details li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #666666;
}

.icon-circle {
  background-color: #2e7ad8;
  border-radius: 50%;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 32px;
  height: 32px;
}

.icon-circle svg {
  width: 16px;
  height: 16px;
  fill: white;
}

.package-details span {
  font-weight: 600;
  font-size: 13px;
  line-height: 1em;
  color: #0B1B29;
}

.package-details strong {
  font-weight: 700;
  font-size: 14px;
  line-height: 1em;
  color: #0B1B29;
  margin-left: auto;
}

.package-details strong.price {
  font-weight: 800;
  font-size: 16px;
  color: #2e7ad8;
}

.package-card .buy-now,
.package-card button {
  background-color: #0B1B29;
  color: white;
  border: none;
  outline: none;
  padding: 12px 24px;
  width: 100%;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1em;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: 10px;
}

.package-card .buy-now:hover,
.package-card button:hover {
  background-color: #152B3D;
  transform: scale(1.02);
}

.show-more {
  text-align: center;
  margin-top: 1.875rem;
}

.show-more button {
  background-color: white;
  border: 0.0625rem solid #ccc;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0.5rem;
} */
/* ================ */
/* Responsive CSS */
/* ================ */
@media screen and (min-width: 2400px) { 
  /* Widder SCREENs */
}
@media screen and (max-width: 1366px) {
  /* DESKTOP SCREENS */
  .esim-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .package-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .package-card .data-plan {
    font-size: 32px;
  }
  .package-card .country-name {
    font-size: 18px;
  }
  .package-card .features li {
    font-size: 13px;
  }
}
  
@media screen and (min-width: 1025px) { 
  /* DESKTOP SCREENS */
}
@media screen and (max-width: 1024.98px) { 
  /* TABLET SCREENS */
  .esim-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .package-card { 
    padding: 18px 14px;
  }
  .package-card .data-plan {
    font-size: 28px;
  }
  .package-card .country-name {
    font-size: 16px;
  }
  .package-card .esim-card-header img {
    width: 45px;
    height: 45px;
  }
  .package-card .features li {
    font-size: 12px;
  }
}
@media screen and (max-width: 767.98px) { 
  /* MOBILE SCREENS */
  .search-box {
    padding: 0.5625rem;
  }
  .search-box input {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    height: 2rem;
  }
  .search-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
  .search-button {
    padding: 0.375rem;
    border-radius: 0.625rem;
  }
  .custom-esims-search-bar button {
    padding: 0.375rem;
    border-radius: 0.625rem;
  }
  .esim-wrapper {
    padding: 2.5rem 0;
  }
  .esim-grid {
    grid-template-columns: 1fr;
  }
  .package-grid {
    grid-template-columns: 1fr;
  }
  .esim-header {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }
  .esim-tabs {
    width: 100%;
    justify-content: space-between;
  }
  .esim-tabs button {
    font-size: 1rem;
  }
  .esim-tab.active {
    font-size: 1.25rem;
  }
  .package-card { 
    padding: 16px 12px;
  }
  .package-card .data-plan {
    font-size: 24px;
  }
  .package-card .country-name {
    font-size: 15px;
  }
  .package-card .country-subtitle {
    font-size: 12px;
  }
  .package-card .esim-card-header img {
    width: 40px;
    height: 40px;
  }
  .package-card .best-plan {
    font-size: 13px;
  }
  .package-card .features li {
    font-size: 11px;
    gap: 8px;
  }
  .package-card .features li::before {
    width: 16px;
    height: 16px;
    font-size: 10px;
  }
  .package-card .get-esim-btn {
    padding: 8px 50px;
    font-size: 12px;
  }
  .package-card .price-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}
@media screen and (max-width: 640.98px) { 
  /* SMALL MOBILE SCREENS */
}
@media screen and (max-width: 480.98px) { 
  /* SMALL MOBILE SCREENS */
  .package-card {
    padding: 14px 10px;
  }
  .package-card .data-plan {
    font-size: 20px;
  }
  .package-card .country-name {
    font-size: 14px;
  }
  .package-card .esim-card-header img {
    width: 35px;
    height: 35px;
  }
  .package-card .best-plan {
    font-size: 12px;
  }
  .package-card .features li {
    font-size: 10px;
  }
  .package-card .features li::before {
    width: 14px;
    height: 14px;
    font-size: 9px;
  }
  .package-card .get-esim-btn {
    padding: 7px 40px;
    font-size: 11px;
  }
  .package-card .price-btn {
    padding: 7px 10px;
    font-size: 11px;
    min-width: 60px;
  }
}

/* Search Results Styles */
.esim-search-container {
  position: relative;
  width: 100%;
  max-width: 100rem;
  margin: 0 auto;
}

/* Start of Selection */
.esim-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 1rem;
  margin-top: 0.25rem;
  z-index: 1;
  max-height: 25rem;
  overflow-y: auto;
  
  /* Custom scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: #c1c1c1 #f1f1f1;
}

.esim-search-results::-webkit-scrollbar {
  width: 8px;
  margin-right: 4px;
}

.esim-search-results::-webkit-scrollbar-track {
  background: transparent;
  margin: 0.5rem 0;
}

.esim-search-results::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 1rem;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: background 0.3s ease;
}

.esim-search-results::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
  background-clip: content-box;
}

.esim-search-results::-webkit-scrollbar-corner {
  background: transparent;
}
/* End of Selection */

.esim-search-results:not(:empty) {
  border: 1px solid #E6E6E6;
}
/* End of Selection */

.search-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0.75rem 0.75rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 0;
  transition: all 0.3s;
  cursor: pointer;
}

.search-result-item .country-flag {
  width: 40px;
  height: 40px;
  margin-right: 15px;
  border-radius: 50% !important;
  object-fit: cover;
}

.search-result-item .result-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-result-item h4 {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--e-global-typography-primary-font-family);
  color: #000000;
  margin: 0;
  text-align: left;
  line-height: 1.1em;
}

.search-result-item .package-count {
font-size: 0.75rem;
line-height: 1em;
color: #000000;
opacity: 0.5;
font-weight: 400;
display: flex;
align-items: center;
gap: 0.525rem;
}
.search-result-item .arrow {
display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.25rem;
  color: var(--e-global-color-primary);
  transition: transform 0.2s ease;
}

.no-results, .error {
  padding: 1rem;
  text-align: center;
  color: var(--e-global-color-secondary);
}

.error {
  color: #dc3545;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 767.98px) {
  .search-results-grid {
      grid-template-columns: 1fr;
  }
  
  .search-result-item {
      padding: 0.55rem;
  }
  
  .search-result-item .country-flag {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
  }
}

/* Plugin-specific stronger responsive rules to avoid external overrides */
.my-esim-data .package-grid,
.my-esim-data .esim-grid {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.25rem;
  box-sizing: border-box;
}

/* Desktop: 4 columns */
@media screen and (max-width: 1920px) {
  .my-esim-data .package-grid,
  .my-esim-data .esim-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* Large Tablet/Small Desktop: 3 columns */
@media screen and (max-width: 1366px) {
  .my-esim-data .package-grid,
  .my-esim-data .esim-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Medium Tablet: 2 columns */
@media screen and (max-width: 900px) {
  .my-esim-data .package-grid,
  .my-esim-data .esim-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Small Tablet and Mobile: 1 column */
@media screen and (max-width: 768px) {
  .my-esim-data .package-grid,
  .my-esim-data .esim-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    padding: 0 !important;
  }
  .my-esim-data .package-card {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}