/* Quiz AI User Results Styles */
.quiz-ai-user-results {
  margin: 20px 0;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
}

.quiz-ai-user-results .no-results {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 16px;
}

.quiz-results-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.quiz-results-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0;
}

.quiz-results-table thead {
  background: #f8f8f8;
  border-bottom: 2px solid #e0e0e0;
}

.quiz-results-table th {
  padding: 15px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quiz-results-table tbody tr {
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.2s ease;
}

.quiz-results-table tbody tr:hover {
  background-color: #f9f9f9;
}

.quiz-results-table td {
  padding: 18px 20px;
  vertical-align: middle;
  font-size: 14px;
}

.quiz-results-table .quiz-title {
  font-weight: 500;
}

.quiz-results-table .quiz-link {
  color: #2271b1;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}

.quiz-results-table .quiz-link:hover {
  color: #135e96;
  text-decoration: underline;
}

.quiz-results-table .quiz-result {
  text-align: center;
}

.quiz-results-table .result-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

.quiz-results-table .result-badge.status-excellent {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.quiz-results-table .result-badge.status-good {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.quiz-results-table .result-badge.status-average {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.quiz-results-table .result-badge.status-fail {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.quiz-results-table .quiz-time,
.quiz-results-table .quiz-date {
  color: #666;
  font-size: 14px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .quiz-results-table {
    font-size: 13px;
  }

  .quiz-results-table th,
  .quiz-results-table td {
    padding: 12px 10px;
  }

  .quiz-results-table th {
    font-size: 12px;
  }

  .quiz-results-table .result-badge {
    padding: 4px 12px;
    font-size: 12px;
  }
}

@media screen and (max-width: 480px) {
  .quiz-ai-user-results {
    padding: 15px 10px;
  }

  /* Stack table for mobile */
  .quiz-results-table,
  .quiz-results-table thead,
  .quiz-results-table tbody,
  .quiz-results-table th,
  .quiz-results-table td,
  .quiz-results-table tr {
    display: block;
  }

  .quiz-results-table thead {
    display: none;
  }

  .quiz-results-table tr {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
  }

  .quiz-results-table td {
    padding: 8px 0;
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: right;
  }

  .quiz-results-table td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 45%;
    padding-right: 10px;
    font-weight: 600;
    text-align: left;
    color: #333;
  }

  .quiz-results-table .quiz-title {
    padding-left: 0;
    text-align: left;
  }

  .quiz-results-table .quiz-title:before {
    content: none;
  }

  .quiz-results-table .quiz-result {
    text-align: right;
  }
}
