/* ════════ IP ADDRESS LOOKUP & SUBNET SUITE STYLES ════════ */

:root {
  --tool-indigo: #06b6d4;
  --tool-indigo-hover: #0891b2;
  --tool-indigo-soft: rgba(6, 182, 212, 0.08);
  --tool-indigo-glow: rgba(6, 182, 212, 0.2);
  --warning-amber: #f59e0b;
  --warning-amber-glow: rgba(245, 158, 11, 0.2);
  --danger-red: #ef4444;
  --danger-red-glow: rgba(239, 68, 68, 0.2);
  --success-green: #10b981;
  --success-green-glow: rgba(16, 185, 129, 0.2);
}

body.light {
  --tool-indigo: #0891b2;
  --tool-indigo-hover: #0e7490;
  --tool-indigo-soft: rgba(8, 145, 178, 0.08);
  --tool-indigo-glow: rgba(8, 145, 178, 0.2);
  --warning-amber: #d97706;
  --warning-amber-glow: rgba(217, 119, 6, 0.25);
  --danger-red: #dc2626;
  --danger-red-glow: rgba(220, 38, 38, 0.25);
  --success-green: #059669;
  --success-green-glow: rgba(5, 150, 105, 0.2);
}

/* ─── HERO GRADIENT SPAN OVERRIDE ─── */
.tool-header h1 span {
  background: linear-gradient(135deg, #06b6d4 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light .tool-header h1 span {
  background: linear-gradient(135deg, #0891b2 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── CONTAINER UI STANDARD WIDTH ─── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 100px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* ─── LAYOUT GRID RATIO OVERRIDE ─── */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .tool-layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
}

/* ─── IP SEARCH BOX ─── */
.ip-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.ip-search-box input[type="text"] {
  flex: 1;
  min-width: 200px;
  height: 46px;
  padding: 0 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.ip-search-box input[type="text"]:focus {
  border-color: var(--tool-indigo);
  box-shadow: 0 0 0 3px var(--tool-indigo-soft);
}

body.light .ip-search-box input[type="text"] {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

body.light .ip-search-box input[type="text"]::placeholder {
  color: #94a3b8;
}

body.light .ip-search-box input[type="text"]:focus {
  border-color: var(--tool-indigo);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.ip-search-btn {
  height: 46px;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--tool-indigo) 0%, var(--tool-indigo-hover) 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--tool-indigo-glow);
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ip-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--tool-indigo-glow);
}

.ip-myip-btn {
  height: 46px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-2);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ip-myip-btn:hover {
  background: var(--tool-indigo-soft);
  border-color: var(--tool-indigo-glow);
  color: var(--tool-indigo);
}

body.light .ip-myip-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

body.light .ip-myip-btn:hover {
  background: var(--tool-indigo-soft);
  border-color: var(--tool-indigo);
  color: var(--tool-indigo);
}

/* ─── SCORECARD GRID ─── */
.ip-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}

@media (max-width: 640px) {
  .ip-scorecard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.counter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  box-sizing: border-box;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 84px;
}

.counter-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

.counter-title {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.counter-value {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.3;
}

.country-flag-emoji {
  -webkit-text-fill-color: initial !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  display: inline-block;
  margin-left: 4px;
  font-style: normal;
}

#card-ip-val {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  word-break: break-all;
  line-height: 1.35;
  letter-spacing: -0.2px;
  max-width: 100%;
}

.ip-version-badge {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--tool-indigo-soft);
  color: var(--tool-indigo);
  border: 1px solid var(--tool-indigo-glow);
  margin-top: 4px;
  -webkit-text-fill-color: initial !important;
}

#card-location-val {
  font-size: 14px !important;
}

#card-isp-val {
  font-size: 12.5px !important;
  word-break: break-word;
}

#card-ping-val {
  font-size: 20px !important;
}

body.light .counter-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}

body.light .counter-title {
  color: #64748b;
}

body.light .counter-value {
  background: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── SEGMENTED VIEW TABS ─── */
.view-tabs {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}

body.light .view-tabs {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
}

.tab-indicator {
  position: absolute;
  top: 4px;
  height: calc(100% - 8px);
  left: 0;
  width: 0;
  background: var(--tool-indigo);
  border-radius: 8px;
  box-shadow: 0 4px 14px var(--tool-indigo-glow);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

.view-tab-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 9px 12px;
  background: transparent !important;
  border: none;
  border-radius: 8px;
  color: var(--text-2);
  font-family: 'Outfit', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.25s ease;
  text-align: center;
  box-shadow: none !important;
  white-space: nowrap;
}

body.light .view-tab-btn {
  color: #64748b;
}

.view-tab-btn.active {
  color: #ffffff !important;
}

/* ─── GEOLOCATION DETAILS GRID ─── */
.geo-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

@media (max-width: 640px) {
  .geo-details-grid {
    grid-template-columns: 1fr;
  }
}

.geo-item-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

body.light .geo-item-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

body.light .geo-item-card:hover {
  border-color: rgba(8, 145, 178, 0.25);
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.06);
}

.geo-label {
  font-family: 'Outfit', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

body.light .geo-label {
  color: #64748b;
}

.geo-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

body.light .geo-value {
  color: #0f172a;
}

/* ─── CIDR OVERVIEW & HOST VISUALIZER CARDS ─── */
.cidr-summary-card {
  margin-bottom: 16px;
  padding: 20px 24px;
  background: var(--tool-indigo-soft);
  border: 1px solid var(--tool-indigo-glow);
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

body.light .cidr-summary-card {
  background: rgba(8, 145, 178, 0.05) !important;
  border-color: rgba(8, 145, 178, 0.18) !important;
  box-shadow: 0 4px 16px rgba(8, 145, 178, 0.04);
}

.cidr-title-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body.light .cidr-title-val {
  color: #0f172a;
}

.ip-class-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light .ip-class-badge {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #475569;
}

.host-count-badge {
  padding: 8px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--tool-indigo) 0%, var(--tool-indigo-hover) 100%);
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--tool-indigo-glow);
  display: flex;
  align-items: center;
  gap: 6px;
}

.host-ip-chip {
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  color: var(--tool-indigo);
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: all;
}

body.light .host-ip-chip {
  background: rgba(8, 145, 178, 0.06);
  border-color: rgba(8, 145, 178, 0.18);
  color: #0891b2;
}

.host-ip-chip:hover {
  background: var(--tool-indigo) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--tool-indigo-glow);
}

.host-visualizer-box, .cli-box {
  margin-top: 16px;
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

body.light .host-visualizer-box, body.light .cli-box {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
}

/* ─── PRIVACY DISCLAIMER BANNER ─── */
.privacy-disclaimer-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--tool-indigo-soft);
  border: 1px solid var(--tool-indigo-glow);
  border-radius: 14px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

body.light .privacy-disclaimer-banner {
  background: rgba(8, 145, 178, 0.06) !important;
  border-color: rgba(8, 145, 178, 0.2) !important;
}

.privacy-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.privacy-text {
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

body.light .privacy-text {
  color: #334155;
}

.privacy-text strong {
  color: var(--tool-indigo);
  font-weight: 700;
}

body.light .privacy-text strong {
  color: #0891b2;
}

/* ─── BATCH TABLE ─── */
.batch-table-wrapper {
  overflow-x: auto;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light .batch-table-wrapper {
  border-color: rgba(15, 23, 42, 0.1);
}

.batch-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.batch-table th, .batch-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light .batch-table th, body.light .batch-table td {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.batch-table th {
  background: rgba(255, 255, 255, 0.03);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-2);
}

body.light .batch-table th {
  background: #f1f5f9;
  color: #475569;
}

/* ─── TOOLBOX BUTTONS ─── */
.toolbox-btn {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-family: 'Figtree', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.toolbox-btn:hover {
  border-color: var(--tool-indigo-glow);
  background: var(--tool-indigo-soft);
  color: var(--tool-indigo);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.12);
}

body.light .toolbox-btn {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

body.light .toolbox-btn:hover {
  background: var(--tool-indigo-soft);
  border-color: var(--tool-indigo);
  color: var(--tool-indigo);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.1);
}

/* ─── MOBILE RESPONSIVENESS OVERRIDES ─── */
@media (max-width: 768px) {
  .container {
    padding: 0 14px 60px;
  }

  .view-tabs {
    flex-wrap: wrap;
    gap: 4px;
  }

  .view-tab-btn {
    flex: 1 1 45%;
    font-size: 11px;
    padding: 8px 4px;
  }
}
