/* Frontend Styles for Geo Ranking Tables */

.grt-ranking-table-wrapper {
  margin: 20px 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.grt-table-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  text-align: center;
}

.grt-table-title {
  margin: 0 0 10px 0;
  font-size: 1.5em;
  font-weight: bold;
}

.grt-location-info {
  font-size: 0.9em;
  opacity: 0.9;
}

.grt-user-location {
  font-weight: bold;
  color: #ffd700;
}

.grt-table-loading {
  padding: 40px;
  text-align: center;
  background: #f9f9f9;
}

.grt-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: grt-spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes grt-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.grt-table-content {
  padding: 0;
}

.grt-sites-table {
  width: 100%;
}

.grt-site-row {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.3s ease;
}

.grt-site-row:hover {
  background-color: #f8f9ff;
}

.grt-site-row:last-child {
  border-bottom: none;
}

.grt-site-rank {
  flex: 0 0 60px;
  text-align: center;
}

.grt-rank-number {
  background: #667eea;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2em;
}

.grt-site-logo {
  flex: 0 0 80px;
  margin-right: 20px;
}

.grt-site-logo img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
}

.grt-site-initial {
  width: 60px;
  height: 60px;
  background: #667eea;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: bold;
}

.grt-site-info {
  flex: 1;
  min-width: 0;
}

.grt-site-name {
  margin: 0 0 8px 0;
  font-size: 1.3em;
  font-weight: bold;
  color: #333;
}

.grt-site-rating {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.grt-stars {
  display: flex;
  gap: 2px;
}

.grt-star {
  font-size: 1.2em;
}

.grt-star-full {
  color: #ffd700;
}

.grt-star-half {
  color: #ffd700;
  position: relative;
}

.grt-star-half::after {
  content: "☆";
  position: absolute;
  left: 50%;
  color: #ddd;
}

.grt-star-empty {
  color: #ddd;
}

.grt-rating-text {
  font-size: 0.9em;
  color: #666;
  font-weight: 500;
}

.grt-site-description {
  margin: 8px 0;
  color: #666;
  line-height: 1.4;
  font-size: 0.95em;
}

.grt-site-bonus {
  background: #e8f5e8;
  color: #2d5016;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.9em;
  margin-top: 8px;
  border-left: 3px solid #4caf50;
}

.grt-site-license {
  color: #666;
  font-size: 0.85em;
  margin-top: 6px;
}

.grt-site-action {
  flex: 0 0 120px;
  text-align: center;
}

.grt-visit-site-btn {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
}

.grt-visit-site-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
  color: white;
  text-decoration: none;
}

.grt-no-link {
  color: #999;
  font-style: italic;
}

.grt-table-fallback {
  padding: 40px;
  text-align: center;
  background: #f9f9f9;
}

.grt-fallback-message h4 {
  color: #d32f2f;
  margin-bottom: 15px;
  font-size: 1.3em;
}

.grt-fallback-message p {
  color: #666;
  line-height: 1.5;
  max-width: 500px;
  margin: 0 auto;
}

.grt-no-sites {
  padding: 40px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.grt-no-results {
  padding: 30px;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* Disclaimer Styles */
.grt-site-disclaimer {
  margin-top: 12px;
  padding-top: 10px;
}

.grt-disclaimer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2196f3;
  font-size: 0.9em;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.grt-disclaimer-toggle:hover {
  color: #1976d2;
  text-decoration: none;
}

.grt-disclaimer-arrow {
  display: inline-block;
  font-size: 0.7em;
  transition: transform 0.3s ease;
}

.grt-disclaimer-toggle.active .grt-disclaimer-arrow {
  transform: rotate(180deg);
}

.grt-disclaimer-content {
  margin-top: 10px;
  padding: 12px 15px;
  background: #f9f9f9;
  border-radius: 4px;
  font-size: 0.85em;
  line-height: 1.6;
  color: #555;
}

.grt-disclaimer-content a {
  color: #2196f3;
  text-decoration: underline;
}

.grt-disclaimer-content a:hover {
  color: #1976d2;
}

/* Responsive Design */
@media (max-width: 768px) {
  .grt-site-row {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  .grt-site-rank {
    flex: none;
    margin-bottom: 15px;
  }

  .grt-site-logo {
    flex: none;
    margin: 0 0 15px 0;
  }

  .grt-site-info {
    margin-bottom: 15px;
  }

  .grt-site-action {
    flex: none;
  }

  .grt-site-rating {
    justify-content: center;
  }

  .grt-table-title {
    font-size: 1.3em;
  }
}

@media (max-width: 480px) {
  .grt-ranking-table-wrapper {
    margin: 10px 0;
    border-radius: 4px;
  }

  .grt-table-header {
    padding: 15px;
  }

  .grt-site-row {
    padding: 12px;
  }

  .grt-site-name {
    font-size: 1.1em;
  }

  .grt-visit-site-btn {
    padding: 10px 20px;
    font-size: 0.9em;
  }
}
