/* ============================================================
   LaTeX PDF to Post — Front-end Content Styles
   Designed for Mathpix Snip LaTeX/MMD output rendered in WordPress
   ============================================================ */

/* ----------------------------------------------------------
   Container
   ---------------------------------------------------------- */
.lptp-content {
    font-size: 16px;
    line-height: 1.85;
    color: #1e293b;
    word-break: break-word;
    font-family: 'Georgia', 'Times New Roman', serif;
    max-width: 780px;
}

/* ----------------------------------------------------------
   Title / Author (Mathpix \title{} \author{})
   ---------------------------------------------------------- */
.lptp-content .lptp-title {
    font-size: 1.9em;
    font-weight: 700;
    text-align: center;
    margin-top: 0.5em;
    margin-bottom: 0.25em;
    color: #0f2044;
    border: none;
}

.lptp-content .lptp-author {
    text-align: center;
    color: #475569;
    font-size: 0.95em;
    margin-top: 0;
    margin-bottom: 1.5em;
}

/* ----------------------------------------------------------
   Abstract (Mathpix \begin{abstract})
   ---------------------------------------------------------- */
.lptp-content .lptp-abstract {
    border-left: 4px solid #1a3a6e;
    margin: 1.5em 0 2em;
    padding: 14px 20px;
    background: #f0f4ff;
    border-radius: 0 8px 8px 0;
    font-size: 0.93em;
    color: #334155;
    line-height: 1.7;
}

.lptp-content .lptp-abstract strong {
    display: block;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1a3a6e;
    margin-bottom: 6px;
}

/* ----------------------------------------------------------
   Headings (Mathpix \section \subsection \subsubsection)
   ---------------------------------------------------------- */
.lptp-content h2.lptp-section {
    font-size: 1.4em;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.3em;
    margin-top: 2.4em;
    margin-bottom: 0.8em;
    color: #0f2044;
}

.lptp-content h3.lptp-subsection {
    font-size: 1.15em;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.5em;
    color: #1a3a6e;
}

.lptp-content h4.lptp-subsubsection {
    font-size: 1em;
    font-weight: 700;
    font-style: italic;
    margin-top: 1.6em;
    margin-bottom: 0.4em;
    color: #334155;
}

/* ----------------------------------------------------------
   Body text
   ---------------------------------------------------------- */
.lptp-content p {
    margin-bottom: 1.2em;
    text-align: justify;
}

/* ----------------------------------------------------------
   Display math blocks (Mathpix \[ … \] output)
   ---------------------------------------------------------- */
.lptp-content .lptp-display-math {
    overflow-x: auto;
    margin: 1.8em 0;
    padding: 18px 24px;
    background: #f8fafc;
    border-left: 4px solid #1a3a6e;
    border-radius: 0 6px 6px 0;
    font-size: 1.08em;
}

/* MathJax rendered display container */
.lptp-content mjx-container[display="true"] {
    overflow-x: auto;
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

/* Equation numbers (\tag, \label in Mathpix) */
.lptp-content mjx-container[display="true"] > mjx-math {
    text-align: left;
}

/* ----------------------------------------------------------
   Tables (Mathpix \begin{tabular} output)
   ---------------------------------------------------------- */
.lptp-content .lptp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.8em 0;
    font-size: 0.93em;
    overflow-x: auto;
    display: block;
}

.lptp-content .lptp-table th,
.lptp-content .lptp-table td {
    border: 1px solid #cbd5e1;
    padding: 8px 14px;
    text-align: left;
    vertical-align: top;
}

.lptp-content .lptp-table th {
    background: #1a3a6e;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.88em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lptp-content .lptp-table tr:nth-child(even) td {
    background: #f8fafc;
}

.lptp-content .lptp-table tr:hover td {
    background: #eff6ff;
}

/* ----------------------------------------------------------
   Lists (Mathpix \begin{itemize} \begin{enumerate})
   ---------------------------------------------------------- */
.lptp-content .lptp-list {
    margin: 1em 0 1.4em 1.6em;
    padding: 0;
    line-height: 1.8;
}

.lptp-content .lptp-list li {
    margin-bottom: 0.4em;
}

.lptp-content ul.lptp-list {
    list-style-type: disc;
}

.lptp-content ol.lptp-list {
    list-style-type: decimal;
}

/* ----------------------------------------------------------
   Page breaks
   ---------------------------------------------------------- */
.lptp-content hr.lptp-page-break {
    border: none;
    border-top: 1px dashed #cbd5e1;
    margin: 2.8em 0;
    opacity: 0.6;
}

/* ----------------------------------------------------------
   Inline math (rendered by MathJax)
   ---------------------------------------------------------- */
.lptp-content mjx-container:not([display="true"]) {
    vertical-align: baseline;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media ( max-width: 640px ) {
    .lptp-content {
        font-size: 15px;
    }
    .lptp-content .lptp-display-math {
        padding: 12px 14px;
    }
    .lptp-content .lptp-table {
        font-size: 0.85em;
    }
}

/* ── Question / Solution styles (from Vision API output) ── */
.lptp-content .lptp-meta {
    font-size: 13px;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: inline-block;
}

.lptp-content .lptp-section-label {
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #1a3a6e;
    margin: 1.8em 0 .6em;
    border-bottom: 2px solid #1a3a6e;
    padding-bottom: 4px;
    display: inline-block;
}

.lptp-content .lptp-question {
    margin: 1.6em 0 .5em;
    line-height: 1.8;
}

.lptp-content .lptp-qnum {
    font-weight: 700;
    color: #1a3a6e;
    margin-right: 6px;
}

.lptp-content .lptp-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
    margin: 10px 0 14px 24px;
    font-size: 0.97em;
}

@media (max-width: 600px) {
    .lptp-content .lptp-options { grid-template-columns: 1fr; }
}

.lptp-content .lptp-opt {
    padding: 3px 0;
}

.lptp-content .lptp-solution {
    background: #f0f7ff;
    border-left: 4px solid #1a3a6e;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin: 10px 0 24px;
    font-size: 0.97em;
    line-height: 1.9;
}

.lptp-content .lptp-solution strong {
    color: #0d1f3c;
    font-size: 1em;
}

.lptp-content .lptp-step {
    margin: .4em 0;
}

.lptp-content .lptp-conclusion {
    font-style: italic;
    color: #334155;
    margin-top: .8em;
}

.lptp-content .lptp-display-math {
    overflow-x: auto;
    margin: 1.2em 0;
    padding: 12px 18px;
    background: #f8fafc;
    border-radius: 6px;
    text-align: center;
}
