/* Benchmark Styles */
.benchmark-cards-container {
  margin: 30px 0;
  width: 100%;
}

.benchmark-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 20px;
  margin-bottom: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  border: 1px solid #e6e6e6;
  overflow: hidden;
}

.benchmark-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.benchmark-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px;
}

.benchmark-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.benchmark-metrics {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0 -10px; /* Negative margin to offset child padding */
}

.benchmark-metric {
  flex: 1;
  min-width: 120px;
  margin: 10px;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.benchmark-metric-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}

.benchmark-metric-value {
  font-size: 22px;
  font-weight: 700;
  color: #333;
}

.benchmark-comparison {
  margin-top: 20px;
}

.benchmark-bar-container {
  height: 24px;
  background-color: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin: 12px 0;
}

.benchmark-bar {
  height: 100%;
  background-color: #129ed9; /* Primary blue color */
  border-radius: 12px;
  position: relative;
}

.benchmark-bar-avg {
  position: absolute;
  width: 2px;
  height: 100%;
  background-color: #ff9800; /* Orange for average */
  top: 0;
}

.benchmark-bar-best {
  position: absolute;
  width: 2px;
  height: 100%;
  background-color: #4caf50; /* Green for best */
  top: 0;
}

.benchmark-legend {
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  flex-wrap: wrap;
}

.benchmark-legend-item {
  display: flex;
  align-items: center;
  margin-right: 15px;
  margin-bottom: 5px;
}

.benchmark-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 5px;
}

.legend-your {
  background-color: #129ed9;
}

.legend-avg {
  background-color: #ff9800;
}

.legend-best {
  background-color: #4caf50;
}

.benchmark-controls {
  display: flex;
  justify-content: flex-start;
  margin: 15px 0;
  flex-wrap: wrap;
}

.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  width: 100%;
}

.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #129ed9;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

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

/* Ad Labelizer Overview Styles */
.ad-labelizer-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.ad-labelizer-table th {
  text-align: left;
  padding: 8px;
  border-bottom: 2px solid #ddd;
  font-weight: 600;
  background-color: #f8f8f8;
}

.ad-labelizer-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.ad-labelizer-table tr:hover {
  background-color: #f5f5f5;
}

.ad-label-changes-container {
  margin-top: 15px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 5px;
  background-color: #fff;
}

.ad-labelizer-actions {
  margin-top: 15px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* Ad Labelizer Results Styles */
.results-summary {
  margin: 15px 0;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 15px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

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

.result-label {
  font-weight: 500;
  color: #555;
}

.result-value {
  font-weight: 600;
  color: #333;
}

.success-message {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.next-steps-message {
  border-left: 4px solid #129ed9;
}

.next-steps-message p {
  margin: 5px 0;
}

/* Benchmark Table Improvements */
.benchmark-table-container {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 24px;
  width: 100%;
  border: 1px solid #e6e6e6;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 14px;
}

.benchmark-table th,
.benchmark-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.benchmark-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.benchmark-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.benchmark-table tr:hover {
  background-color: #f0f7fa;
}

/* Benchmark Title Styling */
.benchmark-title {
  margin-bottom: 24px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.benchmark-title h3 {
  font-size: 22px;
  color: #129ed9;
  margin-bottom: 8px;
}

.benchmark-title p {
  color: #666;
  margin: 0;
}

.no-benchmark-data {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-top: 15px;
}

/* Countries Comparison Styling */
.countries-comparison {
  margin-top: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 20px;
  border: 1px solid #e6e6e6;
}

.countries-comparison h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
}

.countries-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.countries-column {
  flex: 1;
  min-width: 200px;
}

.countries-column h5 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #555;
}

.countries-column ol {
  margin: 0;
  padding-left: 25px;
}

.countries-column li {
  margin-bottom: 5px;
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .benchmark-metrics {
    flex-direction: column;
  }
  
  .benchmark-metric {
    width: calc(100% - 20px);
  }
  
  .countries-grid {
    flex-direction: column;
  }
  
  .benchmark-table th,
  .benchmark-table td {
    padding: 8px;
    font-size: 13px;
  }
}

/* Additional Benchmark Layout Styles */
.benchmark-section {
  width: 100%;
  margin: 20px 0;
  padding: 0;
}

.benchmark-loader-container {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 24px;
  width: 100%;
  border: 1px solid #e6e6e6;
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.benchmark-stats-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.benchmark-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.insights-header {
  margin-bottom: 20px;
}

.insights-header h2 {
  font-size: 24px;
  color: #333;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.insights-header h2 i {
  margin-right: 10px;
  color: #129ed9;
}

.insights-description {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 20px;
  border-left: 4px solid #129ed9;
}

.insights-description p {
  margin: 0;
  line-height: 1.5;
  color: #555;
}

/* Benchmark Comparison Table Styles */
.benchmark-comparison-table {
  margin: 25px 0;
  width: 100%;
}

.benchmark-table-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #129ed9;
}

.benchmark-table {
  width: 100%;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

.benchmark-table-header {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
  background: linear-gradient(135deg, #129ed9 0%, #0d7aa7 100%);
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.benchmark-table-header > div {
  padding: 15px 12px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.benchmark-table-header > div:first-child {
  text-align: left;
}

.benchmark-table-header > div:last-child {
  border-right: none;
}

.benchmark-table-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.benchmark-table-row:hover {
  background-color: #f8f9fa;
}

.benchmark-table-row:last-child {
  border-bottom: none;
}

.benchmark-table-row > div {
  padding: 15px 12px;
  text-align: center;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.benchmark-table-row .metric-name {
  text-align: left;
  font-weight: 600;
  color: #333;
  justify-content: flex-start;
}

.benchmark-table-row .your-value {
  font-weight: 700;
  color: #129ed9;
}

.benchmark-table-row .avg-value {
  color: #666;
}

.benchmark-table-row .max-value {
  color: #4caf50;
  font-weight: 600;
}

/* Enhanced performance indicators */
.performance-indicator {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 4px 8px;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.03);
  min-width: 80px;
}

.performance-indicator i {
  font-size: 12px !important;
}

.performance-indicator span:first-of-type {
  font-weight: 600 !important;
  font-size: 13px;
}

.performance-indicator span:last-of-type {
  font-size: 11px !important;
  text-transform: lowercase;
}

/* Table styling for standard HTML tables */
.benchmark-table {
  width: 100%;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
  border-collapse: collapse;
}

.benchmark-table th {
  background: linear-gradient(135deg, #129ed9 0%, #0d7aa7 100%);
  color: white;
  font-weight: 600;
  font-size: 14px;
  padding: 15px 12px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.benchmark-table th:first-child {
  text-align: left;
}

.benchmark-table th:last-child {
  border-right: none;
}

.benchmark-table td {
  padding: 15px 12px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #f0f0f0;
}

.benchmark-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: #333;
}

.benchmark-table td:nth-child(2) {
  font-weight: 600;
  color: #129ed9;
}

.benchmark-table td:nth-child(3) {
  color: #666;
}

.benchmark-table td:nth-child(4) {
  color: #4caf50;
  font-weight: 600;
}

.benchmark-table td:last-child {
  border-right: none;
}

.benchmark-table tr:hover {
  background-color: #f8f9fa;
}

.benchmark-table tr:last-child td {
  border-bottom: none;
}

/* Comparison Indicator Styles */
.comparison-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  min-width: 60px;
  text-align: center;
}

.comparison-success {
  background-color: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.comparison-danger {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.comparison-neutral {
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
}

/* Responsive Design for Benchmark Tables */
@media (max-width: 768px) {
  .benchmark-table-header,
  .benchmark-table-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .benchmark-table-header > div,
  .benchmark-table-row > div {
    text-align: left;
    padding: 10px 15px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .benchmark-table-header > div:before,
  .benchmark-table-row > div:before {
    content: attr(data-label) ": ";
    font-weight: 600;
    margin-right: 10px;
  }
  
  .benchmark-table-header > div:before {
    display: none;
  }
  
  .benchmark-table-row .metric-name:before {
    content: "";
  }
  
  .benchmark-table-row .your-value:before {
    content: "Your Store: ";
  }
  
  .benchmark-table-row .avg-value:before {
    content: "Platform Avg: ";
  }
  
  .benchmark-table-row .max-value:before {
    content: "Top Performers: ";
  }
  
  .benchmark-table-row .comparison:before {
    content: "vs Average: ";
  }
  
  /* Mobile table styles */
  .benchmark-table th, .benchmark-table td {
    display: block;
    text-align: left !important;
    padding: 8px 15px;
    border-right: none;
  }
  
  .benchmark-table th {
    display: none; /* Hide headers in mobile */
  }
  
  .benchmark-table td:before {
    content: attr(data-label) ": ";
    font-weight: 600;
    margin-right: 10px;
    color: #129ed9;
  }
  
  .benchmark-table td:first-child:before {
    content: "";
  }
  
  .benchmark-table td:nth-child(2):before {
    content: "Your Store: ";
  }
  
  .benchmark-table td:nth-child(3):before {
    content: "Platform Average: ";
  }
  
  .benchmark-table td:nth-child(4):before {
    content: "Top Performers: ";
  }
  
  .benchmark-table td:nth-child(5):before {
    content: "vs Average: ";
  }
  
  .benchmark-table tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
  }
  
  .performance-indicator {
    justify-content: flex-start !important;
    margin-top: 4px;
  }
} 