/**
Plugin Name: solotutes-frontend
Author: Prakash Joshi
Author URI: https://prakashjoshi.in
Description: Custom styles for solotutes-frontend plugin
Stylesheet for: single template (single-view.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
*/

.rd-single-wrapper { background: transparent; font-family: 'Inter', system-ui, sans-serif; color: var(--rd-text); }

/* Breadcrumbs & Cover */
.st-breadcrumb { font-size: 14px; margin-bottom: 20px; color: var(--rd-muted); display: flex; gap: 8px; align-items: center; }
.st-breadcrumb a { color: var(--rd-primary); text-decoration: none; font-weight: 500; }
.st-breadcrumb a:hover { text-decoration: underline; }
.rd-cover-img { width: 100%; border-radius: var(--rd-radius); margin-bottom: 25px; box-shadow: var(--rd-shadow); object-fit: cover; max-height: 400px; }

/* Header & Meta */
.rd-header { background: var(--rd-card-bg); padding: 10px; border-radius: var(--rd-radius);  margin-bottom: 30px; box-shadow: var(--rd-shadow); }
.rd-title { font-size: 32px; font-weight: 800; margin: 0 0 15px 0; color: #0f172a; line-height: 1.3; }
.rd-meta-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; background: var(--rd-bg); padding: 15px 20px; border-radius: 8px; border: 1px solid var(--rd-border); }
.rd-meta-info { display: flex; gap: 20px; font-size: 14px; color: var(--rd-muted); font-weight: 500; flex-wrap: wrap; }
.rd-meta-info span { display: flex; align-items: center; gap: 6px; }
.rd-meta-info i { color: var(--rd-primary); }

.rd-download-btn { background: var(--rd-primary); color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: 0.2s; box-shadow: 0 4px 10px rgba(20,91,171,0.2); }
.rd-download-btn:hover { background: var(--rd-primary-hover); transform: translateY(-2px); color: #fff; }

/* Content */
.rd-content { font-size: 16px; line-height: 1.6; margin-bottom: 40px; color: #475569; }

/* 🔹 Shared List Container */
.rd-list-container { margin-bottom: 50px; }

/* One-Liner Flashcard Styles */
.ol-card { display: flex; background: var(--rd-card-bg); border: 1px solid var(--rd-border); border-radius: var(--rd-radius); margin-bottom: 20px; box-shadow: var(--rd-shadow); overflow: hidden; transition: 0.2s; }
.ol-card:hover { border-color: #3B82F6; box-shadow: var(--rd-shadow-hover); }
.ol-num-box { background: var(--rd-highlight); width: 60px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: var(--rd-primary); border-right: 1px solid var(--rd-border); flex-shrink: 0; }
.ol-text-box { padding: 20px 25px; flex-grow: 1; }
.ol-q-text { font-size: 17px; font-weight: 700; color: var(--rd-text); margin-bottom: 12px; line-height: 1.5; }
.ol-ans-text { display: inline-block; background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; padding: 8px 16px; border-radius: 6px; font-size: 15px; font-weight: 600; }

/* QA Block Styles */
.qa-block { display: flex; flex-direction: column; background: var(--rd-card-bg); border: 1px solid var(--rd-border); border-radius: var(--rd-radius); margin-bottom: 25px; box-shadow: var(--rd-shadow); overflow: hidden; transition: 0.2s; }
.qa-block:hover { border-color: #cbd5e1; box-shadow: var(--rd-shadow-hover); }
.qa-q-box { display: flex; gap: 15px; padding: 20px 25px; background: #F8FAFC; border-bottom: 1px solid var(--rd-border); align-items: flex-start; }
.qa-badge-q { display: flex; align-items: center; justify-content: center; background: var(--rd-primary); color: #fff; font-weight: 800; font-size: 15px; width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; }
.qa-q-text { font-size: 18px; font-weight: 700; color: var(--rd-text); margin: 0; line-height: 1.5; padding-top: 4px; }
.qa-a-box { padding: 25px; display: flex; gap: 15px; align-items: flex-start; }
.qa-badge-a { display: flex; align-items: center; justify-content: center; background: #E2E8F0; color: var(--rd-muted); font-weight: 800; font-size: 15px; width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; }
.qa-a-text { flex-grow: 1; font-size: 16px; line-height: 1.7; color: #334155; padding-top: 4px; }

/* Bilingual Fallback CSS */
.show-en .q-hi, .show-en .ans-hi { display: none !important; }
.show-hi .has-bilingual .q-en, .show-hi .has-bilingual .ans-en { display: none !important; }
.show-both .q-hi, .show-both .ans-hi, .show-both .q-en, .show-both .ans-en { display: block; }

/* 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; }

/* Related Sections */
.rel-section { margin-bottom: 40px; padding: 30px; background: var(--rd-card-bg); border-radius: var(--rd-radius); border: 1px solid var(--rd-border); box-shadow: var(--rd-shadow); }
.rel-header { margin-bottom: 25px; border-bottom: 1px solid var(--rd-border); padding-bottom: 15px; text-align: center;}
.rel-header h3 { margin: 0 0 5px 0; font-size: 24px; font-weight: 800; color: var(--rd-text); }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

/* Preview Cards (For QA & OneLiner) */
.preview-card { border: 1px solid var(--rd-border); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; background: #fafafa; transition: 0.2s; }
.preview-card:hover { border-color: #cbd5e1; box-shadow: var(--rd-shadow-hover); }
.preview-title { background: #fff; padding: 15px; border-bottom: 1px solid var(--rd-border); font-size: 16px; font-weight: 700; color: var(--rd-text); margin: 0; }
.preview-list { list-style: none; padding: 0; margin: 0; }
.preview-list li { padding: 15px; border-bottom: 1px dashed var(--rd-border); font-size: 14px; line-height: 1.5; }
.preview-list li:last-child { border-bottom: none; }
.p-q { color: var(--rd-text); font-weight: 600; margin-bottom: 5px; }
.p-a { color: #166534; font-weight: 700; display: flex; gap: 5px; }
.read-full-btn { display: block; text-align: center; background: var(--rd-highlight); color: var(--rd-primary); padding: 12px; font-size: 14px; font-weight: 700; text-decoration: none; transition: 0.2s; border-top: 1px solid var(--rd-border); margin-top: auto; }
.read-full-btn:hover { background: var(--rd-primary); color: #fff; }

/* Mixed Practice Grid */
.rel-mixed-section { margin-bottom: 40px; padding-top: 40px; border-top: 2px dashed var(--rd-border); }
.mixed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.mixed-card { background: var(--rd-card-bg); border: 1px solid var(--rd-border); border-radius: var(--rd-radius); overflow: hidden; display: flex; flex-direction: column; transition: 0.2s; box-shadow: var(--rd-shadow); }
.mixed-card:hover { transform: translateY(-4px); border-color: #cbd5e1; }
.m-thumb { height: 160px; background: var(--rd-bg); position: relative; }
.m-thumb img { width: 100%; height: 100%; object-fit: cover; }
.m-badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.95); font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 4px; color: var(--rd-primary); text-transform: uppercase; box-shadow: 0 2px 4px rgba(0,0,0,0.1);}
.m-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.m-body h4 { margin: 0 0 10px 0; font-size: 16px; line-height: 1.4; }
.m-body a { color: var(--rd-text); text-decoration: none; }
.m-body a:hover { color: var(--rd-primary); }
.m-meta { font-size: 12px; color: var(--rd-muted); margin-top: auto; padding-top: 15px; border-top: 1px solid var(--rd-border); display: flex; justify-content: space-between; }

/* Video & Comment Section */
.extra-section { padding: 25px; background: var(--rd-card-bg); border: 1px solid var(--rd-border); border-radius: var(--rd-radius); box-shadow: var(--rd-shadow); margin-bottom: 40px; }
.sec-header { text-align: center; margin-bottom: 25px; }
.sec-header h3 { font-size: 24px; font-weight: 800; margin: 0 0 10px 0; color: var(--rd-text); }
.sec-header p { color: var(--rd-muted); margin: 0; font-size: 15px; }

.st-ad-container{
  margin: 40px 0; text-align: center; background: #f8fafc; border: 1px dashed #cbd5e1; padding: 15px; border-radius: 8px; color: #94a3b8; font-size: 12px; min-height: 250px; display: flex; align-items: center; justify-content: center;
}

@media(max-width: 768px) {
  .ast-container { padding-left: 12px !important; padding-right: 12px !important; }

  .rd-single-wrapper { width: 100%; overflow-x: hidden; box-sizing: border-box; }
  .rd-single-wrapper * { box-sizing: border-box; }

  .rd-content, .qa-a-text, .ol-ans-text, .cp-a, .p-a { word-wrap: break-word; overflow-wrap: break-word; }

  .st-breadcrumb { flex-wrap: wrap; }
  .rd-title { font-size: 24px; }

  .rd-header, .ol-card, .qa-block, .rel-section { padding: 15px; }

  .rd-meta-bar { flex-direction: column; align-items: stretch; padding: 15px; }
  .rd-download-btn { justify-content: center; width: 100%; }

  .ol-card { flex-direction: column; }
  .ol-num-box { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--rd-border); justify-content: flex-start; padding: 10px 15px; font-size: 15px; }
  .ol-text-box { padding: 15px; }

  .qa-q-box, .qa-a-box { flex-direction: column; gap: 10px; padding: 15px; }

  .rd-nav { flex-direction: column; gap: 15px; }
  .rd-nav .nav-next .rd-nav-link { text-align: left; align-items: flex-start; }

  .rel-grid, .mixed-grid { grid-template-columns: 1fr !important; }

  /* Video & Extra Section Full Width Fix */
  .extra-section { padding: 20px 0 !important; overflow: hidden; }
  .extra-section .sec-header { padding: 0 20px; }
  .st-extra-videos { width: 100% !important; margin: 0; padding: 0; }
  .st-extra-videos iframe, .st-extra-videos video { width: 100% !important; border-radius: 0 !important; }
}