/* =========================
   Wrapper
========================= */
.esim-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  box-sizing: border-box;
}

.esim-hero {
  text-align: center;
  margin-bottom: 28px;
}

.esim-hero h1 {
  margin: 0 0 8px;
  font-size: 38px;
  line-height: 1.2;
  font-weight: 700;
  color: #1f2937;
}

.esim-hero p {
  margin: 0;
  font-size: 16px;
  color: #4b5563;
}

/* =========================
   Search box
========================= */
.esim-searchbox {
  position: relative;
  width: 100%;
  max-width: 1068px;
  margin: 0 auto 28px;
}

/* =========================
   Input wrap
   Tag + input + button nằm cùng 1 khung
========================= */
.esim-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 10px 14px;
  border: 2px solid #5b3df5;
  border-radius: 20px;
  background: #ffffff;
  box-sizing: border-box;
  flex-wrap: nowrap;
}

/* Vùng chứa tag */
.esim-selected-inline,
.esim-selected-countries {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 1 auto;
  min-width: 0;
}

/* Ô input */
.esim-input-wrap input,
#esimSearchInput,
.esim-input {
  flex: 1 1 auto;
  min-width: 120px;
  height: 48px;
  padding: 0;
  margin: 0;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 18px;
  line-height: 1.4;
  color: #1f2937;
}

.esim-input-wrap input::placeholder,
#esimSearchInput::placeholder,
.esim-input::placeholder {
  color: #8b97a7;
}

/* Nút search */
.esim-input-wrap button,
#esimSearchBtn,
.esim-search-btn {
  flex: 0 0 auto;
  width: 62px;
  height: 56px;
  border: 0;
  border-radius: 16px;
  background: #1693e6;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.esim-input-wrap button:hover,
#esimSearchBtn:hover,
.esim-search-btn:hover {
  opacity: 0.95;
}

.esim-input-wrap button:active,
#esimSearchBtn:active,
.esim-search-btn:active {
  transform: scale(0.98);
}

/* =========================
   Tag quốc gia
========================= */
.esim-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  padding: 8px 12px;
  border: 1px solid #d7dbe3;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

.esim-tag__left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.esim-tag__flag {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 18px;
}

.esim-tag__text {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111827;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
}

.esim-tag__remove {
  width:20px !important;
  height:20px !important;

  min-width:20px !important;
  min-height:20px !important;

  padding:0 !important;

  background:transparent !important;
  border:none !important;

  color:#6b7280 !important;
  font-size:12px !important;
  line-height:1 !important;

  display:flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;
}

.esim-tag__remove:hover{
  background:#d1d5db;
}

/* =========================
   Dropdown
========================= */
.esim-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 99999;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.esim-dd-list {
  max-height: 420px;
  overflow-y: auto;
}

.esim-dd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px;
  border-bottom: 1px solid #eef2f7;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.esim-dd-item:last-child {
  border-bottom: 0;
}

.esim-dd-item:hover {
  background: #f5f7fb;
}

.esim-dd-item img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 24px;
}

.esim-dd-item span {
  color: #1f2937;
  font-size: 16px;
}

.esim-dd-item b {
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

/* =========================
   Multi country results
========================= */
.esim-multi-country-wrap {
  width: 100%;
  max-width: 1068px;
  margin: 0 auto;
}

/* =========================
   Toast
========================= */
.esim-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  min-width: 220px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 100000;
}

.esim-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.esim-toast--error {
  background: #dc2626;
}

.esim-toast--ok {
  background: #16a34a;
}

/* =========================
   Optional selected result text
========================= */
.esim-selected-result {
  width: 100%;
  max-width: 1068px;
  margin: 12px auto 0;
  font-size: 15px;
  color: #374151;
}

.esim-selected-result p {
  margin: 0;
}

/* =========================
   Single country detail block
========================= */
.esim-country-detail {
  width: 100%;
  max-width: 1068px;
  margin: 0 auto 24px;
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}

/* =========================
   Responsive
========================= */
@media (max-width: 991px) {
  .esim-wrap {
    padding: 24px 14px 36px;
  }

  .esim-hero h1 {
    font-size: 32px;
  }

  .esim-input-wrap {
    min-height: 72px;
    padding: 10px 12px;
  }

  .esim-input-wrap input,
  #esimSearchInput,
  .esim-input {
    font-size: 17px;
  }

  .esim-input-wrap button,
  #esimSearchBtn,
  .esim-search-btn {
    width: 58px;
    height: 52px;
    font-size: 24px;
  }

  .esim-tag {
    max-width: 180px;
  }

  .esim-tag__text {
    max-width: 105px;
  }
}

@media (max-width: 767px) {
  .esim-hero h1 {
    font-size: 28px;
  }

  .esim-hero p {
    font-size: 15px;
  }

  .esim-searchbox {
    margin-bottom: 20px;
  }

  .esim-input-wrap {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
  }

  .esim-selected-inline,
  .esim-selected-countries {
    width: 100%;
  }

  .esim-input-wrap input,
  #esimSearchInput,
  .esim-input {
    min-width: 0;
    width: calc(100% - 70px);
    height: 44px;
    font-size: 16px;
  }

  .esim-input-wrap button,
  #esimSearchBtn,
  .esim-search-btn {
    width: 54px;
    height: 44px;
    border-radius: 12px;
    font-size: 22px;
  }

  .esim-dropdown {
    top: calc(100% + 6px);
    border-radius: 14px;
  }

  .esim-dd-item {
    padding: 14px 12px;
    gap: 10px;
  }

  .esim-dd-item span,
  .esim-dd-item b {
    font-size: 15px;
  }

  .esim-tag {
    max-width: 100%;
    padding: 7px 10px;
  }

  .esim-tag__text {
    max-width: 150px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .esim-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .esim-hero h1 {
    font-size: 24px;
  }

  .esim-input-wrap {
    min-height: auto;
  }

  .esim-input-wrap input,
  #esimSearchInput,
  .esim-input {
    width: 100%;
    order: 2;
  }

  .esim-input-wrap button,
  #esimSearchBtn,
  .esim-search-btn {
    order: 3;
    margin-left: auto;
  }

  .esim-selected-inline,
  .esim-selected-countries {
    order: 1;
  }

  .esim-tag__text {
    max-width: 120px;
  }
}

.esim-days-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 0 4px;
}

.esim-days-label {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.esim-days-input {
  width: 110px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  outline: none;
  font-size: 16px;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
}

.esim-days-input:focus {
  border-color: #5b3df5;
}

@media (max-width: 767px) {
  .esim-days-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .esim-days-input {
    width: 100%;
    max-width: 160px;
  }
}

.esim-plan-section {
  width: 100%;
  max-width: 1068px;
  margin: 28px auto 0;
}

.esim-plan-head {
  margin-bottom: 14px;
}

.esim-plan-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.esim-plan-head p {
  margin: 0;
  font-size: 15px;
  color: #6b7280;
}

.esim-plan-table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.esim-plan-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.esim-plan-table thead th {
  background: #f8fafc;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
}

.esim-plan-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid #eef2f7;
  font-size: 15px;
  color: #374151;
  vertical-align: middle;
}

.esim-plan-table tbody tr:hover {
  background: #f9fbff;
}

.esim-plan-table tbody tr:last-child td {
  border-bottom: 0;
}

.esim-plan-empty {
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  color: #6b7280;
  font-size: 15px;
}


.esim-filter-row{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  margin-top:14px;
}

.esim-days-wrap,
.esim-plan-type-wrap{
  flex:1 1 280px;
}

.esim-days-label,
.esim-plan-type-label{
  display:block;
  font-weight:600;
  margin-bottom:8px;
}


.esim-plan-type-options{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.esim-plan-type-item{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:10px 14px;
  border:1px solid #d9d9d9;
  border-radius:10px;
  background:#fff;
  cursor:pointer;
}

.esim-plan-type-item input{
  margin:0;
}

.esim-home-section{
  margin-top: 34px;
}

.esim-home-title{
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 18px;
  font-weight: 500;
}

.esim-home-grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.esim-home-card{
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #ececf3;
  border-radius: 16px;
  background: #fff;
  padding: 16px 18px;
  transition: box-shadow .2s ease, transform .2s ease;
}

.esim-home-card:hover{
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  transform: translateY(-1px);
}

.esim-home-card-left{
  display: flex;
  align-items: center;
  gap: 12px;
}

.esim-home-flag{
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 38px;
}

.esim-home-meta{
  min-width: 0;
}

.esim-home-name{
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.esim-home-price{
  margin-top: 4px;
  font-size: 14px;
  color: #6b35ff;
  font-weight: 500;
}

.esim-home-more-wrap{
  text-align: center;
  margin-top: 16px;
}

.esim-home-more{
  border: 0;
  background: transparent;
  color: #6b35ff;
  font-weight: 700;
  cursor: pointer;
  font-size: 18px;
}

@media (max-width: 1200px){
  .esim-home-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px){
  .esim-home-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .esim-home-title{
    font-size: 26px;
  }
}

@media (max-width: 560px){
  .esim-home-grid{
    grid-template-columns: 1fr;
  }
}

.esim-pagination{
display:flex;
gap:8px;
justify-content:center;
margin-top:20px;
}

.esim-page{
display:inline-flex;
align-items:center;
justify-content:center;
width:36px;
height:36px;
border-radius:8px;
border:1px solid #ddd;
text-decoration:none;
color:#333;
font-weight:600;
}

.esim-page:hover{
background:#f3f3f3;
}

.esim-page.active{
background:#6b35ff;
color:#fff;
border-color:#6b35ff;
}

.esim-hero-subtext {
  margin-top: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #777;
}

@media (max-width: 768px) {
  .esim-hero-subtext {
    font-size: 13px;
    margin-top: 6px;
    margin-bottom: 12px;
    line-height: 1.45;
  }
}



