*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: inherit;
  box-sizing: inherit;
}

body {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  line-height: 1.4;
}

a {
  background-color: #f7fafc;
  color: black;
  text-decoration: underline;
}

.country-info {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  width: auto;
  max-width: min(22rem, calc(100vw - 2rem));
  z-index: 10002;
}

.card--country {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 20px 50px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.card--country.card--open {
  box-shadow:
    0 8px 16px rgba(15, 23, 42, 0.06),
    0 28px 64px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.card--country.card--open:hover {
  transform: translateY(-1px);
}

.card__empty {
  margin: 0;
  padding: 1.1rem 1.25rem;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.45;
}

.card--open .card__empty {
  display: none;
}

.card__hero {
  display: none;
  align-items: stretch;
  gap: 1rem;
  padding: 1.15rem 1.25rem 0.75rem;
  background: linear-gradient(165deg, rgba(241, 245, 249, 0.9) 0%, rgba(255, 255, 255, 0) 72%);
}

.card--open .card__hero {
  display: flex;
}

.card__flag-ring {
  flex-shrink: 0;
  padding: 4px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #e2e8f0);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.card__flag {
  display: none;
  width: 5.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: 8px;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.card__title-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
}

.card__country-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

.card__badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
}

.card__badge--visited {
  color: #1e3a5f;
  background: linear-gradient(135deg, #bfdbfe, #e0e7ff);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.card__badge--soon {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.card__body {
  display: none;
  padding: 0.35rem 1.25rem 0.5rem;
}

.card--open .card__body {
  display: block;
}

.card__row {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.card__row:last-child {
  border-bottom: none;
}

.card__row-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.95);
  color: #475569;
}

.card__row-icon svg {
  display: block;
}

.card__row-text {
  flex: 1;
  min-width: 0;
}

.card__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.card__value {
  display: block;
  margin: 0;
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.35;
}

.card__footer {
  display: none;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem 1.15rem;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(248, 250, 252, 0.65);
}

.card--open .card__footer {
  display: flex;
}

.card__btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.card--open .card__btn {
  display: inline-flex;
}

.card__btn:focus-visible {
  outline: 2px solid #64748b;
  outline-offset: 2px;
}

.card__btn:focus:not(:focus-visible) {
  outline: none;
}

.card__btn:active {
  transform: scale(0.98);
}

.card__btn--secondary {
  color: #f8fafc;
  background: linear-gradient(135deg, #5b6b8c, #475569);
  box-shadow: 0 2px 8px rgba(71, 85, 105, 0.35);
}

.card__btn--secondary:hover {
  background: linear-gradient(135deg, #64748b, #334155);
}

.card__btn--ghost {
  color: #64748b;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.card__btn--ghost:hover {
  color: #334155;
  background: #f8fafc;
  border-color: #94a3b8;
}

.description {
  background-color: #f7fafc;
  color: black;
  bottom: 23px;
  position: absolute;
  right: 25px;
  height: 16px;
  z-index: 100;
}

.map-styles {
  height: 125vh;
  position: relative;
  background-color: #eef2f7;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(139, 157, 195, 0.35), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(203, 213, 225, 0.45), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(226, 232, 240, 0.9), transparent 45%),
    linear-gradient(180deg, #f8fafc 0%, #e8edf5 100%);
}

.map-styles .datamap {
  filter: drop-shadow(0 12px 24px rgba(15, 23, 42, 0.08));
}

.description-lead {
  max-width: 42rem;
}

.count-em {
  font-weight: 700;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.map-legend__swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.map-legend__swatch--visited {
  background: #5b6b8c;
}

.map-legend__swatch--other {
  background: #d8dee9;
}

.country-info-item {
  display: none;
}

path.datamaps-subunit {
  cursor: pointer;
  transition: filter 0.15s ease;
}

path.datamaps-subunit:hover {
  filter: brightness(1.02);
}

.info-item-text {
  display: block;
}

.icon {
  color: inherit;
  vertical-align: middle;
}

svg {
  display: inline-block;
}

.datamaps-hoverover {
  pointer-events: none;
}

.hoverinfo {
  padding: 12px 14px !important;
  height: auto;
  min-width: 10rem;
  border-radius: 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}

.hoverinfo--rich {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hoverinfo-text {
  flex: 1;
  min-width: 0;
}

.hover-country-name {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px;
  line-height: 1.25;
}

.hover-country-thumb {
  flex-shrink: 0;
  width: 36px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.hover-country-thumb--placeholder {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.hover-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}

.hover-status--visited {
  color: #334155;
  background: linear-gradient(135deg, #c7d2fe, #e2e8f0);
}

.hover-status--soon {
  color: #64748b;
  background: #f1f5f9;
}

.hover-country-img {
  width: 30px;
  margin: 8px auto;
}

.hover-info-line {
  margin: 4px 0px;
  font-size: 18px;
  display: inline-block;
}

/* #language {
  display: block;
}
#currency {
  display: block;
}
#region {
  display: block;
}
#capital-name {
  display: block;
}
#time-zone {
  display: none;
} */
