/* Details Page Augmentation
 * Additional styles for the enriched IP details page
 * Requires base.css to be loaded first
 */

/* Layout specific to details page */
header {
  width: 100%;
  text-align: center;
}

main.main-content {
  width: 100%;
  display: flex;
  justify-content: center;
  text-align: left;
}

/* Card Layout */
.card-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(400px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
  width: 100%;
  max-width: 1400px;
}

.card {
  background-color: var(--card-background);
  border-radius: 2px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.card-header {
  background-color: #d0d0d0;
  color: var(--text-color);
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.2rem;
  font-weight: 500;
}

.card-body {
  padding: 20px;
  flex: 1;
}

/* Information Rows */
.info-row {
  display: flex;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  align-items: flex-start;
}

.info-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.label {
  flex: 0 0 38%;
  font-weight: 600;
  color: var(--secondary-color);
  padding-right: 10px;
  text-align: right;
}

.value {
  flex: 0 0 60%;
  word-break: break-word;
}

/* Threat Status */
.threat-status:contains("No") {
  color: var(--success-color);
}

.threat-status:contains("Yes") {
  color: var(--danger-color);
}

/* Blocklist */
.blocklist {
  margin: 0;
  padding-left: 20px;
}

.blocklist li {
  margin-bottom: 5px;
}

/* Map Section - completely separate from cards */
.map-section {
  width: 100%;
  max-width: 1400px;
  margin: 30px auto;
  border-radius: 2px;
  overflow: hidden;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
}

.map-header {
  background-color: #d0d0d0;
  color: var(--text-color);
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-color);
}

.map-header h3 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.2rem;
  font-weight: 500;
}

#ip-map {
  width: 100%;
  height: 600px;
  background-color: #e9ecef;
}

/* Leaflet Popup Styling */
.leaflet-popup-content {
  font-family: "Lato", "Assistant", sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.map-popup-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--primary-color);
}

/* Responsive Design */
@media (min-width: 1200px) {
  .card-container {
    grid-template-columns: repeat(4, minmax(300px, 1fr));
  }
}

@media (max-width: 900px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .card-container {
    grid-template-columns: 1fr;
    max-width: 600px;
  }

  .info-row {
    flex-direction: column;
  }

  .label {
    flex: 0 0 100%;
    margin-bottom: 5px;
    text-align: left;
  }

  .value {
    flex: 0 0 100%;
  }

  .ip-address {
    font-size: 1.8rem;
  }
}
