/**
Plugin Name: solotutes-frontend
Author: Prakash Joshi
Author URI: https://prakashjoshi.in
Description: Custom styles for solotutes-frontend plugin
Stylesheet for: quiz-single template (single-quiz.php)
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: solotutes-frontend
*/

html {
  scroll-behavior: smooth;
}
.quiz-single { background: transparent; }

.st-breadcrumb { margin-bottom: 20px; font-size: 14px; color: var(--text-muted); }
.st-breadcrumb a { color: var(--primary-color); text-decoration: none; font-weight: 500; }

/* Entry Header - CLEANED (No Box/Shadow) */
.entry-header { margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.test-title { font-size: 32px; font-weight: 800; margin: 0 0 15px 0; color: var(--text-dark); line-height: 1.3; }
/* ===============================
   MODERN META WRAPPER UI
================================ */
.st-meta-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  background: #f8fafc;
  padding: 15px 20px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-bottom: 25px;
}

.st-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 14px;
  color: #64748b;
}

.st-meta-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.st-meta-info a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.st-meta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Action Buttons Base */
.st-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Inner Badge for Counts */
.meta-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* Attempt Button Theme (Green/Success) */
.attempt-btn {
  background: #eefaf0;
  color: #10b981;
  border: 1px solid #10b981;
}
.attempt-btn:hover {
  background: #10b981;
  color: #fff;
}
.attempt-btn .meta-badge {
  background: rgba(16, 185, 129, 0.15);
  color: inherit;
}
.attempt-btn:hover .meta-badge {
  background: rgba(255, 255, 255, 0.3);
}

/* Download Button Theme (Primary Brand) */
.download-btn {
  background: var(--primary-color);
  color: #fff;
  border: 1px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(10, 99, 232, 0.2);
}
.download-btn:hover {
  background: #0747a6;
  box-shadow: 0 6px 15px rgba(10, 99, 232, 0.3);
  color: #fff;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .st-meta-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
  .st-meta-actions {
    width: 100%;
  }
  .st-action-btn {
    flex: 1; /* Makes buttons 50-50 width on mobile */
  }
}
/* Cover Image */
.qa-cover img { width: 100%; border-radius: 12px; margin-bottom: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); object-fit: cover; max-height: 400px; }

/* Test Description */
.test-desc { font-size: 16px; color: #444; line-height: 1.6; margin-bottom: 25px; }

/* Toolbar: Lang & Instructions */
.st-quiz-toolbar { display: flex; justify-content: space-between; align-items: center; background: var(--card-bg); padding: 12px 20px; border-radius: 10px; margin-bottom: 20px; border: 1px solid var(--border-color); gap: 15px; }
.st-lang-select { display: flex; align-items: center; }
.st-lang-select select { padding: 8px 10px; border-radius: 6px; border: 1px solid #ccc; font-weight: 600; color: var(--text-dark); outline: none; cursor: pointer; }
.st-lang-select label { font-weight: 600; margin-right: 8px; color: var(--text-muted); }
#infoBtn {  border: 1px solid #ccc; padding: 8px 15px; border-radius: 6px; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* Modal (Overlay) for Instructions */
.st-info-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 9999; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.st-info-content { background: #fff; padding: 25px; border-radius: 12px; max-width: 400px; width: 90%; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.2); animation: popIn 0.3s ease; }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.st-info-close { position: absolute; top: 15px; right: 20px; font-size: 24px; font-weight: bold; color: #555; cursor: pointer; line-height: 1; }
.st-info-content h4 { margin-top: 0; color: var(--primary-color); font-size: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }

/* Ad Slots */
.st-ad-slot { background: #fdfdfd; border: 1px dashed #ccc; text-align: center; padding: 15px; color: #999; font-size: 13px; margin: 20px 0; border-radius: 8px; }

/* Progress & Nav */
.st-progress { height: 10px; background: #e2e8f0; border-radius: 10px; margin: 10px 0 15px 0; overflow: hidden; }
.st-progress-bar { height: 100%; background: linear-gradient(90deg, #0A63E8, #4a90e2); width: 0; transition: width 0.4s ease-in-out; border-radius: 10px; }
.st-q-counter { text-align: right; font-size: 14px; font-weight: 700; color: var(--primary-color); margin-bottom: 15px; }
.st-question-nav { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 15px; padding-bottom: 10px; }
.qnav-btn { min-width: 40px; height: 40px; border: 1px solid #ccc; border-radius: 8px; cursor: pointer; background: #fff; font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
.qnav-btn.active { border: 2px solid var(--primary-color); background: var(--primary-color); color: #fff; }
.qnav-btn.attempted { background: var(--success-color); border-color: var(--success-color); color: #fff; }

/* Questions Area */
.st-question { display: none; background: var(--card-bg); padding: 30px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); margin-bottom: 25px; border: 1px solid var(--border-color); animation: fadeIn 0.4s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.st-q-title { font-weight: 700; font-size: 18px; margin-bottom: 15px; color: var(--text-dark); line-height: 1.5; }
.st-q-desc { background: #f8f9fa; padding: 15px; border-radius: 8px; font-size: 15px; margin-bottom: 20px; border-left: 3px solid #ccc; }

/* Language Inline & Fallback CSS */
.st-en-text { display: inline; }
.st-hi-text { display: inline; color: #555; font-weight: 500; }
.st-separator { display: inline; margin: 0 4px; color: #999; }
body.lang-en .st-hi-text, body.lang-en .st-separator { display: none !important; }
body.lang-hi .st-en-text.has-hi, body.lang-hi .st-separator { display: none !important; }

.st-q-img, .st-opt-img, .st-exp-img { max-width: 250px; border-radius: 8px; margin: 10px 0; display: block; height: auto; border: 1px solid #eee; }

/* Options */
.st-options { margin-top: 10px; }
.st-options label { display: flex; gap: 15px; align-items: center; padding: 14px 16px; margin-bottom: 10px; border: 2px solid #e2e8f0; border-radius: 10px; cursor: pointer; transition: all 0.2s ease; background: #fff; font-size: 15px; font-weight: 500; }
.st-options label:hover { border-color: var(--primary-color); background: #f8faff; }
.st-options input { display: none; }
.st-options label.correct { background: #eefaf0; border-color: var(--success-color); color: #155724; }
.st-options label.incorrect { background: #fdf0f1; border-color: var(--danger-color); color: #721c24; }

.st-expl { margin-top: 20px; background: #fff8e1; padding: 15px; border-radius: 8px; border-left: 4px solid #ffc107; font-size: 14px; color: #333; line-height: 1.6; display: none; }

/* Navigation Buttons */
.st-navigation-wrapper { display: flex; flex-direction: column; gap: 15px; margin-bottom: 20px; }
.st-navigation-row { display: flex; justify-content: space-between; gap: 15px; }
.st-navigation-row button { flex: 1; padding: 14px 20px; border: 0; background: var(--primary-color); color: #fff; border-radius: 8px; font-weight: 700; font-size: 16px; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 12px rgba(10,99,232,0.2); }
#showReport { width: 100%; padding: 15px; background: var(--text-dark); color: #fff; font-weight: bold; border-radius: 8px; border: none; cursor: pointer; font-size: 16px; transition: 0.3s; }
#showReport:disabled { background: #cbd5e1; cursor: not-allowed; }

/* Score + Report */
.st-score { margin: 20px 0; font-weight: 800; text-align: center; font-size: 20px; background: #eef2fa; padding: 20px; border-radius: 10px; color: var(--primary-color); }
.st-report { display: none; padding: 25px; background: var(--card-bg); border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 1px solid var(--border-color); margin-bottom: 30px; }
.reportTable p { padding: 12px 0; border-bottom: 1px solid #eee; margin: 0; font-size: 14px; }

/* Similar Quizzes Fix */
.test-similar { margin-top: 50px; padding-top: 40px; border-top: 1px solid var(--border-color); }
.test-similar h3 { text-align: center; margin-bottom: 30px; font-size: 24px; color: var(--text-dark); font-weight: 800; }
.test-similar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.test-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: transform 0.3s; display: flex; flex-direction: column; }
.test-card:hover { transform: translateY(-5px); border-color: #ccc; }
.test-card-img { width: 100%; height: 160px; object-fit: cover; }
.test-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.test-card-title { font-size: 17px; font-weight: 700; margin: 0 0 10px 0; line-height: 1.4; }
.test-card-title a { text-decoration: none; color: var(--text-dark); transition: 0.2s; }
.test-card-title a:hover { color: var(--primary-color); }
.test-card-meta { font-size: 13px; color: var(--text-muted); margin-top: auto; }

/* Navigation */
.rd-nav { display: flex; justify-content: space-between; gap: 20px; margin: 40px 0 50px 0; }
.rd-nav-link { flex: 1; padding: 15px 20px; border: 1px solid var(--rd-border); border-radius: var(--rd-radius); text-decoration: none; display: flex; flex-direction: column; background: var(--rd-card-bg); transition: 0.3s; }
.rd-nav-link:hover { border-color: var(--rd-primary); box-shadow: var(--rd-shadow); transform: translateY(-2px); }
.nav-label { font-size: 11px; color: var(--rd-muted); text-transform: uppercase; font-weight: 800; margin-bottom: 6px; letter-spacing: 0.5px; }
.nav-title { font-size: 15px; font-weight: 700; color: var(--rd-text); line-height: 1.4; }
.rd-nav .nav-next .rd-nav-link { text-align: right; align-items: flex-end; }


/* MOBILE FIXES */
@media(max-width:768px){
  .test-title { font-size: 24px; }
  .st-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
  .st-meta-btn { margin-left: 0; width: 100%; text-align: center; }

  .st-quiz-toolbar { flex-direction: row; padding: 10px 15px; flex-wrap: wrap; }
  .st-lang-select label { display: none; }
  .st-lang-select select { padding: 6px 10px; font-size: 13px; margin-right: 10px; }
  #infoBtn { padding: 6px 10px; font-size: 13px; }

  .st-question { padding: 20px 15px; }
  .st-options label { padding: 12px; font-size: 14px; align-items: flex-start; }

  .st-navigation-row { flex-wrap: nowrap; }
  .st-navigation-row button { font-size: 14px; padding: 12px; }
  .st-nav { flex-direction: column; }
}