/**
 * LinkKart - Gerçek Zamanlı Analitik Stilleri
 */

/* Gerçek Zamanlı Kartlar */
.realtime-cards .row {
  display: flex;
  flex-wrap: wrap;
  margin: -0.75rem;
}

.realtime-cards .col-md-6,
.realtime-cards .col-lg-3 {
  padding: 0.75rem;
}

.realtime-card {
  background-color: var(--white);
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  height: 100%;
  transition: all 0.3s;
  border: 1px solid var(--gray-100);
}

.realtime-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.realtime-card .card-body {
  padding: 1.5rem;
  display: flex;
  align-items: center;
}

.realtime-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.5rem;
  background-color: var(--primary-bg);
  color: var(--primary-color);
}

/* Nabız efekti */
.realtime-icon.pulse {
  animation: pulse 2s infinite;
  position: relative;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

.realtime-details {
  flex: 1;
}

.realtime-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.realtime-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

/* Ziyaretçiler Tablosu */
.realtime-table-card {
  margin-bottom: 1.5rem;
}

.realtime-table-card .card-body {
  padding: 0;
}

.realtime-table-card table {
  margin-bottom: 0;
}

.realtime-table-card th {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.875rem;
  padding: 1rem;
  background-color: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.realtime-table-card td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.875rem;
}

.realtime-table-card tbody tr:hover {
  background-color: var(--gray-50);
}

.flag-icon, .browser-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--gray-100);
  border-radius: 6px;
  color: var(--gray-700);
}

/* Popüler Sayfalar Listesi */
.popular-pages-list {
  display: flex;
  flex-direction: column;
}

.popular-page-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
}

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

.popular-page-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background-color: var(--gray-100);
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.75rem;
}

.popular-page-item:nth-child(1) .popular-page-rank {
  background-color: var(--primary-bg);
  color: var(--primary-color);
}

.popular-page-info {
  flex: 1;
  min-width: 0;
  margin-right: 0.75rem;
}

.popular-page-url {
  font-size: 0.875rem;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.popular-page-views {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 60px;
}

.views-value {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--gray-900);
}

.views-label {
  font-size: 0.7rem;
  color: var(--gray-500);
}

/* Referrer Listesi */
.referrers-list {
  display: flex;
  flex-direction: column;
}

.referrer-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
}

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

.referrer-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--gray-100);
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  font-size: 1rem;
}

.referrer-item:nth-child(1) .referrer-icon {
  background-color: var(--primary-bg);
  color: var(--primary-color);
}

.referrer-info {
  flex: 1;
  min-width: 0;
  margin-right: 0.75rem;
}

.referrer-name {
  font-size: 0.875rem;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.referrer-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.count-value {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--gray-900);
}

.count-label {
  font-size: 0.7rem;
  color: var(--gray-500);
}

/* Responsive Ayarlar */
@media (max-width: 992px) {
  .realtime-cards .col-lg-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 768px) {
  .realtime-cards .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .realtime-table-card {
    margin-bottom: 1rem;
  }
  
  .popular-page-url,
  .referrer-name {
    max-width: 120px;
  }
}

@media (max-width: 576px) {
  .realtime-table-card .table-responsive {
    border: 0;
  }
  
  .realtime-card {
    margin-bottom: 1rem;
  }
}
