/* Additions to the VPS plans page: the location switch, and the country picker.
 *
 * NOTE ON THE FILENAME. ArvanCloud fronts my.trusthost.ir and caches static
 * assets by path, ignoring the query string - so editing this file in place
 * leaves every visitor on the old copy and no ?v= bump will dislodge it. The
 * version is therefore in the filename: change a rule here, save it as
 * vps-plans-ext.v4.css, and update the template link. */

/* ── Step one: where the server sits ──────────────────────────────────────
   This is the decision that changes price, delivery time and traffic terms,
   so it is a pair of large, plainly-labelled choices rather than two more
   tabs among seven. */
.thvps-scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.thvps-scope-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  text-align: right;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.thvps-scope-btn:hover { border-color: #cbd5e1; background: #fbfdff; }
.thvps-scope-btn.active {
  border-color: #2563eb;
  background: linear-gradient(135deg, rgba(37, 99, 235, .06) 0%, rgba(29, 78, 216, .04) 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .12);
}
.thvps-scope-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 13px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.15rem;
  transition: background .18s ease, color .18s ease;
}
.thvps-scope-btn.active .thvps-scope-icon {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
}
.thvps-scope-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.thvps-scope-title { font-weight: 800; font-size: 1.02rem; color: #0f172a; }
.thvps-scope-sub { font-size: .78rem; line-height: 1.7; color: #64748b; }

/* ── Step two, abroad: which country ──────────────────────────────────────
   Twelve countries and 191 plans will not fit one grid without becoming a
   wall, so the countries come first and the plans follow one country at a
   time. The tiles borrow the card language already used on this page rather
   than introducing a second one. */
.thvps-foreign-countries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.thvps-country-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: right;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.thvps-country-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}
.thvps-country-head {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
}
.thvps-country-flag {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
  border: 1px solid rgba(15, 23, 42, .08);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.thvps-country-name { font-weight: 700; font-size: 1rem; color: #0f172a; line-height: 1.2; }
.thvps-country-meta { font-size: .76rem; color: #64748b; }

.thvps-foreign-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e9eef5;
}
.thvps-foreign-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #0f172a;
}
.thvps-foreign-title .thvps-country-flag {
  width: 22px;
  height: 16.5px;
}
.thvps-foreign-title small { font-weight: 400; color: #64748b; }
.thvps-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: .84rem;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.thvps-back-btn:hover { background: #eef2f7; border-color: #cbd5e1; }

@media (max-width: 767.98px) {
  .thvps-scope { grid-template-columns: 1fr; }
  .thvps-scope-btn { padding: 14px; }
}
@media (max-width: 575.98px) {
  .thvps-foreign-countries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thvps-country-card { padding: 14px; }
  .thvps-scope-sub { font-size: .74rem; }
}
