/* =========================================================
   EducationistGuru — Editorial Components (Shared)
   Loaded by BOTH public pages & CMS editor so rich content
   authored in /edit renders identically on the live site.
   ========================================================= */

/* ──────────── 1. EDITORIAL TABLES & CONTENT TABLES ──────────── */
.editorial-table,
.editorial-content table,
.cd-body-text table,
.blog-body table,
.course-overview table,
#cdOverviewText table,
.tab-pane table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.6;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.editorial-table thead tr,
.editorial-content table thead tr,
.cd-body-text table thead tr,
.blog-body table thead tr,
.course-overview table thead tr,
#cdOverviewText table thead tr,
.tab-pane table thead tr {
    background: linear-gradient(135deg, #f1f5f9 0%, #e8ecf1 100%);
}

.editorial-table th,
.editorial-content table th,
.cd-body-text table th,
.blog-body table th,
.course-overview table th,
#cdOverviewText table th,
.tab-pane table th {
    border: 1px solid #cbd5e1;
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13.5px;
    color: #1e293b;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.editorial-table td,
.editorial-content table td,
.cd-body-text table td,
.blog-body table td,
.course-overview table td,
#cdOverviewText table td,
.tab-pane table td {
    border: 1px solid #e2e8f0;
    padding: 11px 16px;
    color: #334155;
    font-size: 14px;
    vertical-align: top;
}

.editorial-table tbody tr,
.editorial-content table tbody tr,
.cd-body-text table tbody tr,
.blog-body table tbody tr,
.course-overview table tbody tr,
#cdOverviewText table tbody tr,
.tab-pane table tbody tr {
    transition: background-color 0.2s ease;
}

.editorial-table tbody tr:nth-child(even),
.editorial-content table tbody tr:nth-child(even),
.cd-body-text table tbody tr:nth-child(even),
.blog-body table tbody tr:nth-child(even),
.course-overview table tbody tr:nth-child(even),
#cdOverviewText table tbody tr:nth-child(even),
.tab-pane table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.editorial-table tbody tr:hover,
.editorial-content table tbody tr:hover,
.cd-body-text table tbody tr:hover,
.blog-body table tbody tr:hover,
.course-overview table tbody tr:hover,
#cdOverviewText table tbody tr:hover,
.tab-pane table tbody tr:hover {
    background-color: #eff6ff;
}

/* Status badges inside tables */
.editorial-table .status-active,
.editorial-table .status-open,
.editorial-content table .status-active,
.editorial-content table .status-open {
    color: #16a34a;
    font-weight: 700;
}

/* Responsive table wrapper */
@media (max-width: 640px) {
    .editorial-table,
    .editorial-content table,
    .cd-body-text table,
    .blog-body table,
    .course-overview table,
    #cdOverviewText table,
    .tab-pane table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 13px;
        max-width: 100%;
    }
    .editorial-table th,
    .editorial-table td,
    .editorial-content table th,
    .editorial-content table td,
    .cd-body-text table th,
    .cd-body-text table td,
    .blog-body table th,
    .blog-body table td,
    .course-overview table th,
    .course-overview table td,
    #cdOverviewText table th,
    #cdOverviewText table td,
    .tab-pane table th,
    .tab-pane table td {
        padding: 9px 12px;
        min-width: 100px;
    }
}


/* ──────────── 2. KEY HIGHLIGHTS GRID ──────────── */
.editorial-key-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 20px 0;
}

@media (max-width: 640px) {
    .editorial-key-highlights {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.editorial-highlight-card {
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.editorial-highlight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

/* Color variants */
.editorial-highlight-card.blue {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.editorial-highlight-card.emerald {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.editorial-highlight-card.amber {
    background: #fffbeb;
    border-color: #fde68a;
}

.editorial-highlight-card.pink {
    background: #fdf2f8;
    border-color: #fbcfe8;
}

.editorial-highlight-card.violet {
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.editorial-highlight-card.rose {
    background: #fff1f2;
    border-color: #fecdd3;
}

.editorial-highlight-title {
    font-weight: 700;
    font-size: 13.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.editorial-highlight-card.blue .editorial-highlight-title { color: #1e40af; }
.editorial-highlight-card.emerald .editorial-highlight-title { color: #065f46; }
.editorial-highlight-card.amber .editorial-highlight-title { color: #92400e; }
.editorial-highlight-card.pink .editorial-highlight-title { color: #9d174d; }
.editorial-highlight-card.violet .editorial-highlight-title { color: #5b21b6; }
.editorial-highlight-card.rose .editorial-highlight-title { color: #9f1239; }

.editorial-highlight-title i {
    font-size: 14px;
}

.editorial-highlight-card.blue .editorial-highlight-title i { color: #2563eb; }
.editorial-highlight-card.emerald .editorial-highlight-title i { color: #059669; }
.editorial-highlight-card.amber .editorial-highlight-title i { color: #d97706; }
.editorial-highlight-card.pink .editorial-highlight-title i { color: #db2777; }
.editorial-highlight-card.violet .editorial-highlight-title i { color: #7c3aed; }
.editorial-highlight-card.rose .editorial-highlight-title i { color: #e11d48; }

.editorial-highlight-desc {
    font-size: 13px;
    color: #334155;
    line-height: 1.55;
}


/* ──────────── 3. FAQ BOXES ──────────── */
.editorial-faq-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 18px 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editorial-faq-box:hover {
    border-color: #ff6b00;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.06);
}

.editorial-faq-q {
    font-weight: 800;
    color: #0f172a;
    font-size: 15px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.editorial-faq-q i {
    color: #ff6b00;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.editorial-faq-a {
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
    padding-left: 26px;
}


/* ──────────── 4. QUOTE / BLOCKQUOTE BOXES ──────────── */
.editorial-quote-box {
    border-left: 4px solid #ff6b00;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    padding: 18px 24px;
    margin: 22px 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #7c2d12;
    position: relative;
}

.editorial-quote-box::before {
    content: '\201C';
    font-size: 52px;
    color: rgba(255, 107, 0, 0.15);
    position: absolute;
    top: -4px;
    left: 12px;
    font-family: Georgia, serif;
    line-height: 1;
}

.editorial-quote-box p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.editorial-quote-author {
    font-style: normal;
    font-weight: 700;
    color: #9a3412;
    font-size: 13px;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}


/* ──────────── 5. NOTICE / INFO BOXES ──────────── */
.editorial-notice-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 18px 0;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.65;
}

.editorial-notice-box p {
    margin: 0;
}

.editorial-notice-box strong {
    color: #1d4ed8;
}

.editorial-notice-box i {
    margin-right: 5px;
}

/* Warning variant */
.editorial-notice-box.warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.editorial-notice-box.warning strong {
    color: #b45309;
}

/* Success variant */
.editorial-notice-box.success {
    background: #ecfdf5;
    border-left-color: #10b981;
    color: #065f46;
}

.editorial-notice-box.success strong {
    color: #047857;
}

/* Error variant */
.editorial-notice-box.error {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.editorial-notice-box.error strong {
    color: #b91c1c;
}


/* ──────────── 6. EDITORIAL FIGURES / IMAGES ──────────── */
.editorial-figure {
    margin: 24px 0;
    text-align: center;
}

.editorial-figure img {
    max-width: 100%;
    max-height: 480px;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.editorial-figure img:hover {
    transform: scale(1.01);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
}

.editorial-caption {
    font-size: 12.5px;
    color: #64748b;
    font-style: italic;
    margin-top: 10px;
    line-height: 1.5;
}


/* ──────────── 7. EDITORIAL DIVIDERS ──────────── */
.editorial-divider,
hr.editorial-divider {
    border: none;
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, #cbd5e1 30%, #94a3b8 50%, #cbd5e1 70%, transparent 100%);
    margin: 28px 0;
}


/* ──────────── 8. TEXT HIGHLIGHTS / MARKS ──────────── */
mark.hl-yellow,
.hl-yellow {
    background: linear-gradient(135deg, #fef9c3, #fef08a);
    color: #713f12;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

mark.hl-green,
.hl-green {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #064e3b;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

mark.hl-blue,
.hl-blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e3a8a;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

mark.hl-pink,
.hl-pink {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #831843;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

mark.hl-orange,
.hl-orange {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: #7c2d12;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}


/* ──────────── 9. IN-CONTENT LEAD INQUIRY BOX ──────────── */
.lead-inquiry-box {
    margin: 24px 0;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    border: 1.5px solid #fed7aa;
    border-radius: 12px;
    text-align: center;
}

.lead-inquiry-box h4 {
    margin: 0 0 6px;
    color: #9a3412;
    font-size: 16px;
    font-weight: 800;
}

.lead-inquiry-box p {
    margin: 0 0 14px;
    color: #78350f;
    font-size: 14px;
    line-height: 1.5;
}

.lead-inquiry-box a,
.lead-inquiry-box button {
    display: inline-block;
    background: #ff6b00;
    color: #fff;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.lead-inquiry-box a:hover,
.lead-inquiry-box button:hover {
    background: #ea580c;
    transform: translateY(-1px);
}


/* ──────────── 10. EDITOR-ONLY TABLE CONTROLS ──────────── */
/* These only appear inside the CMS editor contenteditable area */
.editorial-table-controls {
    display: none; /* Hidden on public pages by default */
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.editorial-table-controls button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.editorial-table-controls button:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

.editorial-table-controls button.add-row {
    color: #059669;
    border-color: #a7f3d0;
}

.editorial-table-controls button.add-row:hover {
    background: #ecfdf5;
}

.editorial-table-controls button.add-col {
    color: #2563eb;
    border-color: #bfdbfe;
}

.editorial-table-controls button.add-col:hover {
    background: #eff6ff;
}

.editorial-table-controls button.del-row {
    color: #dc2626;
    border-color: #fecaca;
}

.editorial-table-controls button.del-row:hover {
    background: #fef2f2;
}

.editorial-table-controls button.del-col {
    color: #dc2626;
    border-color: #fecaca;
}

.editorial-table-controls button.del-col:hover {
    background: #fef2f2;
}

/* Show controls only inside visual-editor-canvas or contenteditable context */
[contenteditable="true"] .editorial-table-controls,
.visual-editor-canvas .editorial-table-controls {
    display: flex !important;
}

.visual-editor-canvas table th,
.visual-editor-canvas table td {
    min-width: 60px;
    padding: 8px 12px;
}


/* ──────────── 11. EDITORIAL COMPONENT WRAPPER ──────────── */
/* Wrapper class that can be added to any content area to enable editorial styles */
.editorial-content h1,
.editorial-content h2,
.editorial-content h3,
.editorial-content h4,
.editorial-content h5,
.editorial-content h6 {
    color: #0f172a;
    line-height: 1.35;
    margin-top: 24px;
    margin-bottom: 12px;
}

.editorial-content h2 {
    font-size: 22px;
    font-weight: 800;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
}

.editorial-content h3 {
    font-size: 18px;
    font-weight: 700;
}

.editorial-content p {
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 14px;
}

.editorial-content ul,
.editorial-content ol {
    padding-left: 20px;
    margin-bottom: 16px;
}

.editorial-content li {
    font-size: 14.5px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 6px;
}

.editorial-content a {
    color: #ff6b00;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed rgba(255, 107, 0, 0.3);
    transition: color 0.2s, border-color 0.2s;
}

.editorial-content a:hover {
    color: #ea580c;
    border-bottom-color: #ea580c;
}


/* ──────────── 12. PRINT STYLES ──────────── */
@media print {
    .editorial-table-controls { display: none !important; }
    .editorial-table { box-shadow: none; }
    .editorial-highlight-card { break-inside: avoid; }
    .editorial-faq-box { break-inside: avoid; }
    .editorial-quote-box { break-inside: avoid; }
    .editorial-notice-box { break-inside: avoid; }
}
