/* User custom styles for What is my IP */

/* Full height background coverage */
html, body {
  min-height: 100vh;
}

body {
  background: #191c24 !important;
}

/* Override template background colors */
.container-scroller {
  background: #191c24 !important;
}

.container-fluid.page-body-wrapper {
  background: #191c24 !important;
}

.main-panel {
  background: #191c24 !important;
}

.content-wrapper {
  background: #191c24 !important;
  padding-bottom: 2rem;
}

/* Footer background */
.footer {
  background: #191c24 !important;
}

/* Ensure main content area extends to full height */
.page-body-wrapper {
  min-height: 100vh;
  background: #191c24 !important;
}

/* =============================
   Light theme just for article page
   ============================= */
.light-article {
  background: #191c24 !important;
}

.light-article .container-scroller,
.light-article .container-fluid.page-body-wrapper,
.light-article .main-panel,
.light-article .content-wrapper,
.light-article .footer {
  background: #191c24 !important;
}

.light-article .card {
  background: #ffffff;
  color: #212529;
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 12px rgba(0,0,0,.06);
}

.light-article .card .card-title,
.light-article h1,
.light-article h2,
.light-article h3,
.light-article h4,
.light-article h5,
.light-article h6 {
  color: #111827;
}

.light-article .text-muted { color: #6c757d !important; }

.light-article .article-card { border-radius: 12px; }
.light-article .article-title { font-weight: 800; line-height: 1.2; }
.light-article .article-meta { font-size: .9rem; }
.light-article .article-body {
  color: #2c2c2c;
  font-size: 1.05rem;
  line-height: 1.8;
}
.light-article .article-body p { margin: 1rem 0; }
.light-article .article-body img { max-width: 100%; height: auto; border-radius: 8px; }

/* Sidebar */
.light-article .sidebar-card { border-radius: 12px; }
.light-article .sidebar-list { margin: 0; padding: 0; }
.light-article .sidebar-item { padding: .5rem 0; border-bottom: 1px solid #f1f3f5; }
.light-article .sidebar-item:last-child { border-bottom: 0; }
.light-article .sidebar-link { color: #0d6efd; text-decoration: none; }
.light-article .sidebar-link:hover { text-decoration: underline; }
.light-article .sidebar-date { color: #6c757d; }

/* Page header and brand spacing on light article page */
.light-article .brand-logo img { filter: none; }

/* Hero */
.hero-section {
  text-align: center;
  padding: 2rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border-radius: 12px;
  margin-bottom: 2rem;
}

/* IP display */
.ip-display {
  font-size: 2.5rem;
  font-weight: bold;
  color: #28a745;
  text-align: center;
  padding: 1rem;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 8px;
  border: 2px solid rgba(40, 167, 69, 0.3);
  margin: 1rem 0;
}

/* IP Main Display */
.ip-main {
  font-size: 2.5rem;
  font-weight: bold;
  color: #28a745;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ip-main .copy-icon {
  font-size: 1.5rem;
  color: #28a745;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  background: none;
  border: none;
  padding: 0;
}

.ip-main .copy-icon:hover {
  opacity: 1;
}

/* IP Secondary Display */
.ip-secondary {
  font-size: 1.2rem;
  font-weight: normal;
  color: #6c757d;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ip-secondary .copy-icon {
  font-size: 1rem;
  color: #6c757d;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  background: none;
  border: none;
  padding: 0;
}

.ip-secondary .copy-icon:hover {
  opacity: 1;
}

/* Horizontal tools strip (scrollable pills) */
.tool-category-filter {
  position: relative;
}

.category-scroll-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-list {
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.25rem 0;
  min-width: 100%;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  white-space: nowrap;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #e7e7e7;
  text-decoration: none;
  transition: all 0.2s ease;
}

.category-pill:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
}

.category-pill.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(233, 255, 0, 0.45);
  color: #fff;
}

.tool-category-filter::-webkit-scrollbar,
.category-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.tool-category-filter::-webkit-scrollbar-thumb,
.category-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
}

/* Dual Stack IP Display */
#dual-stack-info {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(0, 123, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(0, 123, 255, 0.2);
}

.ip-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.ip-version-label {
  font-weight: 600;
  color: #495057;
  min-width: 60px;
}

.ip-version-address {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #007bff;
  flex: 1;
  margin: 0 0.5rem;
  word-break: break-all;
}

.copy-btn-small {
  background: #6c757d;
  color: #ffffff;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background-color 0.2s;
  min-width: 32px;
}

.copy-btn-small:hover {
  background: #545b62;
}

/* Info list */
.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bs-border-color, rgba(255,255,255,0.1));
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
}

.info-value {
  color: var(--bs-text-muted, #9fa7ad);
  text-align: right;
  max-width: 60%;
  word-wrap: break-word;
}

/* Map */
.map-section {
  width: 100%;
  margin: 0.5rem 0;
}

.map-container {
  height: 200px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.map-fallback-icon {
  font-size: 3rem;
  color: #007bff;
}

/* Buttons */
.copy-btn {
  background: #007bff;
  color: #ffffff;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}

.copy-btn:hover { background: #0056b3; }

/* Mobile copy icon adjustments */
@media (max-width: 768px) {
  .ip-main {
    font-size: 2.3rem;
  }
  .ip-main .copy-icon {
    font-size: 1.3rem;
  }
  
  .ip-secondary .copy-icon {
    font-size: 1.2rem;
  }
  
  .ip-version-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .ip-version-address {
    margin: 0.25rem 0;
  }
  
  .copy-btn-small {
    align-self: center;
    margin-top: 0.25rem;
  }
}



.help-icon {
  cursor: help;
  font-size: 1rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Accordion overrides (use template styles) */
.acc-card { margin-bottom: .75rem; }

/* IP Version Badge */
.ip-version-badge {
  margin: 1rem 0;
}

.ip-version-badge .badge {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

/* Inline IP Version Badge */
.ip-version-badge-inline {
  margin-left: 0.5rem;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
}

.ip-version-badge-inline .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
}

/* Masonry layout (Masonry JS) */
.masonry-container {
  margin: 1.5rem 0;
}

/* Sizer defines the column width */
.masonry-sizer, .masonry-item { width: 100%; }

@media (min-width: 769px) {
  .masonry-sizer, .masonry-item { width: calc(50% - 0.75rem); }
  .masonry-gutter { width: 1.5rem; }
}

.masonry-item { margin-bottom: 1.5rem; }

/* Modern IP Button Styling */
.ip-modern-btn {
  background: rgba(40, 167, 69, 0.1);
  border: 2px solid rgba(40, 167, 69, 0.3);
  color: #e7e7e7!important;
  font-weight: bold;
  padding: 12px 30px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.ip-modern-btn:hover {
  background: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.5);
  color: white;
  transform: translateY(-2px);
}

.ip-modern-btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Mobile responsive - full width buttons */
@media (max-width: 768px) {
  .ip-modern-btn {
    width: 100%;
    display: block;
  }
}

/* DNSBL Table Layout Fixes */
#dnsbl-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

#dnsbl-table th,
#dnsbl-table td {
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  vertical-align: top;
  box-sizing: border-box;
  padding: 8px;
  overflow: hidden;
}

#dnsbl-table th:nth-child(1),
#dnsbl-table td:nth-child(1) {
  width: 30%;
}

#dnsbl-table th:nth-child(2),
#dnsbl-table td:nth-child(2) {
  width: 20%;
}

#dnsbl-table th:nth-child(3),
#dnsbl-table td:nth-child(3) {
  width: 50%;
}

/* Ensure status column stays compact */
#dnsbl-table .status-cell {
  white-space: nowrap;
  min-width: 80px;
}

/* Message column with proper text wrapping */
#dnsbl-table .message-cell {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.4;
  word-wrap: break-word;
  word-break: break-all;
  overflow-wrap: break-word;
  hyphens: auto;
  padding: 8px;
  box-sizing: border-box;
}

/* Ensure table container doesn't overflow */
.table-responsive {
  overflow-x: auto;
  max-width: 100%;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
  #dnsbl-table {
    table-layout: auto;
  }
  
  #dnsbl-table th:nth-child(1),
  #dnsbl-table td:nth-child(1) {
    width: auto;
  }
  
  #dnsbl-table th:nth-child(2),
  #dnsbl-table td:nth-child(2) {
    width: auto;
  }
  
  #dnsbl-table th:nth-child(3),
  #dnsbl-table td:nth-child(3) {
    width: auto;
  }
}



