/* Tutor LMS Placement Test Styles */

/* Main containers */
.tpt-progress-container,
.tpt-final-result {
  max-width: 800px;
  margin: 30px auto;
  padding: 30px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 10;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Hide default tutor quiz results when placement test is active */
.tutor-quiz-attempt-history,
.tutor-quiz-attempt-history + *,
.tutor-quiz-attempt-history ~ *,
.tutor-quiz-attempt-history .tutor-quiz-attempt-history-item {
  display: none !important;
}

/* Ensure placement test content is always visible */
.tpt-progress-container,
.tpt-final-result {
  display: block !important;
  visibility: visible !important;
}

/* Headers */
.tpt-progress-header,
.tpt-result-header {
  text-align: center;
  margin-bottom: 30px;
}

.tpt-progress-header h3,
.tpt-result-header h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #1a1a1a;
  font-weight: 600;
}

.tpt-progress-desc,
.tpt-result-header p {
  color: #666;
  font-size: 16px;
  line-height: 1.5;
}

.tpt-success-icon {
  font-size: 64px;
  margin-bottom: 20px;
  display: block;
}

/* Progress bar */
.tpt-progress-bar-wrapper {
  margin: 30px 0;
}

.tpt-progress-bar {
  height: 40px;
  background: #f0f0f0;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tpt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50 0%, #45a049 100%);
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  border-radius: 20px;
}

.tpt-progress-text {
  color: white;
  font-weight: bold;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tpt-progress-count {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

/* Quiz list */
.tpt-quiz-list {
  margin: 30px 0;
}

.tpt-quiz-list h4 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
}

.tpt-quiz-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tpt-quiz-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  border-left: 4px solid #4caf50;
}

.tpt-quiz-item:hover {
  transform: translateX(5px);
  background: #f0f8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tpt-quiz-check {
  width: 30px;
  height: 30px;
  background: #4caf50;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
}

.tpt-quiz-title {
  flex: 1;
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.tpt-quiz-score {
  font-weight: bold;
  font-size: 16px;
  color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Next quiz section */
.tpt-next-quiz {
  text-align: center;
  margin-top: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tpt-next-quiz p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.95;
}

.tpt-continue-btn {
  display: inline-block;
  padding: 12px 30px;
  background: white;
  color: #667eea;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tpt-continue-btn:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  border-color: white;
}

.tpt-continue-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Result level */
.tpt-result-level {
  text-align: center;
  margin: 40px 0;
}

.tpt-result-level h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #555;
  font-weight: 600;
}

.tpt-level-badge {
  display: inline-block;
  padding: 20px 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 32px;
  font-weight: bold;
  border-radius: 50px;
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
  margin: 20px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tpt-level-desc {
  font-size: 16px;
  color: #666;
  margin-top: 15px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Stats cards */
.tpt-result-stats {
  display: flex;
  gap: 20px;
  margin: 40px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.tpt-stat-card {
  flex: 1;
  min-width: 150px;
  padding: 25px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.tpt-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tpt-stat-value {
  font-size: 36px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
  line-height: 1;
}

.tpt-stat-label {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Quiz breakdown */
.tpt-quiz-breakdown {
  margin: 40px 0;
}

.tpt-quiz-breakdown h4 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
  font-weight: 600;
}

.tpt-result-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tpt-result-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 4px solid #4caf50;
  transition: all 0.3s ease;
}

.tpt-result-item:hover {
  background: #f0f8f0;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tpt-quiz-name {
  flex: 1;
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.tpt-quiz-percentage {
  font-weight: bold;
  font-size: 18px;
  color: #4caf50;
  margin-right: 10px;
  background: rgba(76, 175, 80, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

.tpt-quiz-marks {
  font-size: 14px;
  color: #999;
  font-style: italic;
}

/* Footer */
.tpt-result-footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  background: #f0f9ff;
  border-radius: 10px;
  color: #0369a1;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid #bae6fd;
}

/* Responsive design */
@media (max-width: 768px) {
  .tpt-progress-container,
  .tpt-final-result {
    margin: 15px;
    padding: 20px;
  }

  .tpt-continue-btn {
    width: 100%;
    text-align: center;
    display: block;
    margin-top: 10px;
  }

  .tpt-result-stats {
    flex-direction: column;
  }

  .tpt-stat-card {
    min-width: 100%;
  }

  .tpt-level-badge {
    font-size: 24px;
    padding: 15px 30px;
  }

  .tpt-progress-header h3,
  .tpt-result-header h2 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .tpt-progress-container,
  .tpt-final-result {
    margin: 10px;
    padding: 15px;
  }

  .tpt-level-badge {
    font-size: 20px;
    padding: 12px 24px;
  }

  .tpt-stat-value {
    font-size: 28px;
  }
}

/* Hide quiz details for placement tests */
.tutor-quiz-attempt-history
  .tutor-quiz-attempt-history-item
  .tutor-quiz-attempt-history-item-actions,
.tutor-quiz-attempt-history
  .tutor-quiz-attempt-history-item
  .tutor-quiz-attempt-history-item-actions
  a,
.tutor-quiz-attempt-history
  .tutor-quiz-attempt-history-item
  .tutor-quiz-attempt-history-item-actions
  button {
  display: none !important;
}

/* Hide Details column in quiz results table */
.tutor-quiz-attempt-history
  .tutor-quiz-attempt-history-item
  .tutor-quiz-attempt-history-item-details,
.tutor-quiz-attempt-history
  .tutor-quiz-attempt-history-item
  .tutor-quiz-attempt-history-item-details
  a,
.tutor-quiz-attempt-history
  .tutor-quiz-attempt-history-item
  .tutor-quiz-attempt-history-item-details
  button {
  display: none !important;
}

/* Hide Details button specifically */
.tutor-quiz-attempt-history .tutor-quiz-attempt-history-item a[href*="details"],
.tutor-quiz-attempt-history
  .tutor-quiz-attempt-history-item
  button[onclick*="details"],
.tutor-quiz-attempt-history
  .tutor-quiz-attempt-history-item
  .tutor-quiz-attempt-history-item-actions
  a,
.tutor-quiz-attempt-history
  .tutor-quiz-attempt-history-item
  .tutor-quiz-attempt-history-item-actions
  button {
  display: none !important;
}

/* Hide Details column in quiz results table for placement tests */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child {
  display: none !important;
}

/* Hide Details button specifically */
.tutor-table-quiz-attempts a[href*="view_quiz_attempt_id"],
.tutor-table-quiz-attempts .tutor-btn[href*="view_quiz_attempt_id"],
.tutor-table-quiz-attempts .tutor-btn-tertiary {
  display: none !important;
}

/* Alternative selectors for Details column */
.tutor-table-quiz-attempts th:nth-child(8),
.tutor-table-quiz-attempts td:nth-child(8) {
  display: none !important;
}

/* Hide Details column header and data */
.tutor-table-quiz-attempts thead tr th:last-child,
.tutor-table-quiz-attempts tbody tr td:last-child {
  display: none !important;
}

/* Hide any Details links in the table */
.tutor-table-quiz-attempts .tutor-d-inline-flex,
.tutor-table-quiz-attempts .tutor-d-inline-flex a {
  display: none !important;
}

/* More specific selectors for Details column */
.tutor-table-quiz-attempts tbody tr td[data-title="Details"],
.tutor-table-quiz-attempts tbody tr td:last-child,
.tutor-table-quiz-attempts thead tr th[data-title="Details"],
.tutor-table-quiz-attempts thead tr th:last-child {
  display: none !important;
}

/* Hide Details button with specific href pattern */
.tutor-table-quiz-attempts a[href*="view_quiz_attempt_id"],
.tutor-table-quiz-attempts .tutor-btn[href*="view_quiz_attempt_id"] {
  display: none !important;
}

/* Force hide the last column completely */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  visibility: hidden !important;
}

/* Additional selectors to ensure Details column is hidden */
.tutor-table-quiz-attempts tr th:nth-child(8),
.tutor-table-quiz-attempts tr td:nth-child(8) {
  display: none !important;
}

/* Hide Details column using table structure */
.tutor-table-quiz-attempts thead tr th:last-child,
.tutor-table-quiz-attempts tbody tr td:last-child {
  display: none !important;
}

/* Hide any remaining Details elements */
.tutor-table-quiz-attempts .tutor-d-inline-flex,
.tutor-table-quiz-attempts .tutor-d-inline-flex a,
.tutor-table-quiz-attempts .tutor-btn-tertiary {
  display: none !important;
}

/* Ultimate Details column hiding - multiple approaches */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child,
.tutor-table-quiz-attempts th:nth-child(8),
.tutor-table-quiz-attempts td:nth-child(8) {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

/* Hide Details button with all possible selectors */
.tutor-table-quiz-attempts a[href*="view_quiz_attempt_id"],
.tutor-table-quiz-attempts .tutor-btn[href*="view_quiz_attempt_id"],
.tutor-table-quiz-attempts .tutor-btn-tertiary,
.tutor-table-quiz-attempts .tutor-d-inline-flex,
.tutor-table-quiz-attempts .tutor-d-inline-flex a {
  display: none !important;
  visibility: hidden !important;
}

/* Final attempt to hide Details column */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
}

/* Hide Details column using nth-child */
.tutor-table-quiz-attempts th:nth-child(8),
.tutor-table-quiz-attempts td:nth-child(8) {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
}

/* Additional CSS to ensure Details column is completely hidden */
.tutor-table-quiz-attempts thead tr th:last-child,
.tutor-table-quiz-attempts tbody tr td:last-child {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
}

/* Hide Details column using data-title attribute */
.tutor-table-quiz-attempts th[data-title="Details"],
.tutor-table-quiz-attempts td[data-title="Details"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
}

/* Final comprehensive Details column hiding */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child,
.tutor-table-quiz-attempts th:nth-child(8),
.tutor-table-quiz-attempts td:nth-child(8),
.tutor-table-quiz-attempts th[data-title="Details"],
.tutor-table-quiz-attempts td[data-title="Details"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* JavaScript-based hiding for Details column */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* Additional CSS to force hide Details column */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child,
.tutor-table-quiz-attempts th:nth-child(8),
.tutor-table-quiz-attempts td:nth-child(8) {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* Ultimate Details column hiding - all possible selectors */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child,
.tutor-table-quiz-attempts th:nth-child(8),
.tutor-table-quiz-attempts td:nth-child(8),
.tutor-table-quiz-attempts th[data-title="Details"],
.tutor-table-quiz-attempts td[data-title="Details"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* Final attempt to hide Details column completely */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* Additional CSS to ensure Details column is hidden */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child,
.tutor-table-quiz-attempts th:nth-child(8),
.tutor-table-quiz-attempts td:nth-child(8) {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* ============================================
   Hide sidebar elements in placement test course
   Only show "Start Learning" button
   ============================================ */

/* Hide course thumbnail */
.edublink-course-details-sidebar .tutor-course-thumbnail {
  display: none !important;
}

/* Hide "Course Includes" section */
.edublink-course-details-sidebar
  .edublink-course-details-sidebar-content
  .widget-title {
  display: none !important;
}

/* Hide course meta information list */
.edublink-course-details-sidebar .edublink-course-meta-informations {
  display: none !important;
}

/* Hide course progress wrapper */
.edublink-course-details-sidebar .tutor-course-progress-wrapper {
  display: none !important;
}

/* Hide enrollment info */
.edublink-course-details-sidebar .eb-tl-enroll-info {
  display: none !important;
}

/* Hide warning alert */
.edublink-course-details-sidebar .tutor-alert {
  display: none !important;
}

/* Hide chat buttons */
.edublink-course-details-sidebar .advanced-chat-course-buttons {
  display: none !important;
}

/* Hide social share */
.edublink-course-details-sidebar .edublink-single-event-social-share {
  display: none !important;
}

/* Keep only the Start Learning button visible */
.edublink-course-details-sidebar .edublink-course-details-sidebar-buttons {
  display: block !important;
  margin: 0 !important;
  padding: 20px !important;
}

/* Style the Start Learning button */
.edublink-course-details-sidebar
  .edublink-course-details-sidebar-buttons
  .course-sidebar-btn {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  padding: 15px 30px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

/* Clean up the sidebar appearance */
.edublink-course-details-sidebar .edublink-course-details-sidebar-inner {
  padding: 0 !important;
}

.edublink-course-details-sidebar .edublink-course-details-sidebar-content {
  padding: 0 !important;
}

/* Hide Wishlist button in placement test courses */
.edublink-course-details-sidebar .tutor-course-wishlist-btn,
.edublink-course-details-sidebar .tutor-course-wishlist,
.edublink-course-details-sidebar .tutor-btn-wishlist,
.edublink-course-details-sidebar [class*="wishlist"],
.tutor-course-details-widget-wrapper .tutor-course-wishlist-btn,
.tutor-course-details-widget-wrapper .tutor-course-wishlist,
.tutor-course-details-widget-wrapper .tutor-btn-wishlist,
.tutor-course-details-widget-wrapper [class*="wishlist"],
.tutor-course-wishlist-btn,
.tutor-course-wishlist,
.tutor-btn-wishlist,
button[class*="wishlist"],
a[class*="wishlist"],
.tutor-course-sidebar-card-body .tutor-course-wishlist-btn,
.tutor-course-sidebar-card-body .tutor-course-wishlist {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* Change "Start Learning" text to "Start Quiz" - CSS ONLY VERSION */
.edublink-course-details-sidebar
  .edublink-course-details-sidebar-buttons
  .course-sidebar-btn {
  font-size: 0 !important;
  position: relative !important;
}

.edublink-course-details-sidebar
  .edublink-course-details-sidebar-buttons
  .course-sidebar-btn::after {
  content: "Start Quiz" !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 100% !important;
  text-align: center !important;
}

/* Additional CSS to ensure button text change works */
.edublink-course-details-sidebar
  .edublink-course-details-sidebar-buttons
  .course-sidebar-btn,
.tutor-course-sidebar-btn,
.tutor-btn-enroll {
  font-size: 0 !important;
  position: relative !important;
}

.edublink-course-details-sidebar
  .edublink-course-details-sidebar-buttons
  .course-sidebar-btn::after,
.tutor-course-sidebar-btn::after,
.tutor-btn-enroll::after {
  content: "Start Quiz" !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 100% !important;
  text-align: center !important;
}

/* Final comprehensive Details column hiding */
.tutor-table-quiz-attempts th:last-child,
.tutor-table-quiz-attempts td:last-child,
.tutor-table-quiz-attempts th:nth-child(8),
.tutor-table-quiz-attempts td:nth-child(8),
.tutor-table-quiz-attempts th[data-title="Details"],
.tutor-table-quiz-attempts td[data-title="Details"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}
