/* ============================================================
 * AI Blog Drafts — Blog frontend styling
 * Enqueued on single posts. Targets standard WordPress classes
 * and Astra theme wrappers.
 * ============================================================ */

/* ---- Post container: spacing & readability ---- */
.ast-article-single .entry-content {
    padding: 0;
    line-height: 1.75;
    font-size: 1.0625rem;
    color: #2c2c2c;
    background: transparent;
}
@media (min-width: 769px) {
    .ast-article-single {
        padding: 2rem 2.5rem;
        background: #fff !important;
        border-radius: 16px;
        box-shadow: 0 2px 16px rgba(0,0,0,.06);
    }
}
@media (max-width: 768px) {
    .ast-article-single {
        padding: 1.25rem .9rem;
        background: #fff !important;
        border-radius: 12px;
    }
}

/* ---- Headings ---- */
.ast-article-single .entry-content h2 {
    margin-top: 2.2rem;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid rgba(211,101,21,.18);
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c1810;
    line-height: 1.35;
}
.ast-article-single .entry-content h3 {
    margin-top: 1.8rem;
    margin-bottom: .75rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #3c2412;
    line-height: 1.4;
}
.ast-article-single .entry-content h4 {
    margin-top: 1.4rem;
    margin-bottom: .6rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #4c3420;
}

/* ---- Featured image ---- */
.ast-article-single .wp-post-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    object-fit: cover;
    max-height: 420px;
}

/* ---- In-body images ---- */
.ast-article-single .entry-content .wp-block-image {
    margin: 1.75rem 0;
}
.ast-article-single .entry-content .wp-block-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(0,0,0,.1);
    object-fit: cover;
}

/* ---- Tables ---- */
.ast-article-single .entry-content .wp-block-table {
    margin: 1.5rem 0;
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.ast-article-single .entry-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    margin: 0;
    background: #fff;
}
.ast-article-single .entry-content .wp-block-table table th {
    background: #d36515;
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: .65rem .8rem;
    white-space: nowrap;
    font-size: .9rem;
}
.ast-article-single .entry-content .wp-block-table table td {
    padding: .55rem .8rem;
    border-bottom: 1px solid rgba(0,0,0,.07);
    vertical-align: top;
    color: #333;
}
.ast-article-single .entry-content .wp-block-table table tr:nth-child(even) td {
    background: rgba(211,101,21,.04);
}
.ast-article-single .entry-content .wp-block-table table tr:hover td {
    background: rgba(211,101,21,.08);
}

/* ---- Details / FAQ accordion ---- */
.ast-article-single .entry-content .wp-block-details {
    margin: 1rem 0;
    border: 1px solid rgba(211,101,21,.15);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.ast-article-single .entry-content .wp-block-details summary {
    padding: .8rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    color: #3c2412;
    cursor: pointer;
    background: rgba(211,101,21,.06);
    border-radius: 10px;
    transition: background .15s;
    list-style: none;
    position: relative;
}
.ast-article-single .entry-content .wp-block-details summary::-webkit-details-marker {
    display: none;
}
.ast-article-single .entry-content .wp-block-details summary::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    font-weight: 700;
    color: #d36515;
    transition: transform .2s;
}
.ast-article-single .entry-content .wp-block-details[open] summary::after {
    content: '−';
}
.ast-article-single .entry-content .wp-block-details summary:hover {
    background: rgba(211,101,21,.12);
}
.ast-article-single .entry-content .wp-block-details[open] {
    border-color: rgba(211,101,21,.3);
}
.ast-article-single .entry-content .wp-block-details .wp-block-paragraph {
    margin: .75rem 1rem .9rem;
    padding: 0;
    font-size: .95rem;
    color: #444;
}

/* ---- Quote blocks ---- */
.ast-article-single .entry-content .wp-block-quote {
    margin: 1.5rem 0;
    padding: .6rem 1rem;
    border-left: 3px solid #d36515;
    background: rgba(211,101,21,.05);
    border-radius: 0 8px 8px 0;
}
.ast-article-single .entry-content .wp-block-quote p {
    margin: 0;
    color: #4c3420;
    font-style: italic;
}

/* ---- Lists ---- */
.ast-article-single .entry-content ul.wp-block-list,
.ast-article-single .entry-content ol.wp-block-list {
    padding-left: 1.5rem;
    margin: 1rem 0;
    line-height: 1.7;
}
.ast-article-single .entry-content ul.wp-block-list li {
    list-style-type: '•  ';
    color: #333;
}
.ast-article-single .entry-content ol.wp-block-list li {
    color: #333;
}
.ast-article-single .entry-content .wp-block-list li strong {
    color: #2c1810;
}

/* ---- Separator ---- */
.ast-article-single .entry-content .wp-block-separator {
    margin: 2rem 0;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(211,101,21,.15), transparent);
    opacity: 1;
}

/* ---- Sources / credit footer ---- */
.ast-article-single .entry-content > p.has-small-font-size {
    margin-top: 2rem;
    padding: .65rem .9rem;
    background: rgba(0,0,0,.03);
    border-radius: 8px;
    font-size: .8rem !important;
    color: #777;
    line-height: 1.5;
}
.ast-article-single .entry-content > p.has-small-font-size a {
    color: #888;
    text-decoration: none;
}
.ast-article-single .entry-content > p.has-small-font-size a:hover {
    text-decoration: underline;
}

/* ---- Sources heading + list ---- */
.ast-article-single .entry-content h3.wp-block-heading + .wp-block-list {
    background: rgba(0,0,0,.03);
    padding: .8rem 1rem;
    border-radius: 8px;
    margin-top: .5rem;
}
.ast-article-single .entry-content h3.wp-block-heading + .wp-block-list li a {
    color: #d36515;
}

/* ---- Calculator widget (AI Blog Drafts) ---- */
.ast-article-single .aibd-calculator {
    max-width: 480px;
    margin: 1.75rem auto;
    padding: 1.25rem 1rem;
    border: 1px solid rgba(211,101,21,.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(211,101,21,.03), rgba(255,255,255,.95));
    box-shadow: 0 2px 12px rgba(211,101,21,.08);
}
.ast-article-single .aibd-calculator__title {
    text-align: center;
    color: #2c1810;
    font-size: 1.1rem;
    margin: 0 0 1rem;
}
.ast-article-single .aibd-calculator__fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: .5rem .75rem;
    margin-bottom: .9rem;
}
.ast-article-single .aibd-calculator__field label {
    font-size: .8rem;
    color: #5c4c3c;
    margin-bottom: .15rem;
}
.ast-article-single .aibd-calculator__field input {
    padding: .4rem .5rem;
    border: 1px solid rgba(211,101,21,.2);
    border-radius: 6px;
    background: #fff;
    width: 100%;
}
.ast-article-single .aibd-calculator__field input:focus {
    border-color: #d36515;
    box-shadow: 0 0 0 2px rgba(211,101,21,.1);
    outline: none;
}
.ast-article-single .aibd-calculator__button {
    width: 100%;
    padding: .5rem;
    border: none;
    border-radius: 8px;
    background: #d36515;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: .95rem;
}
.ast-article-single .aibd-calculator__button:hover {
    background: #b85510;
}
.ast-article-single .aibd-calculator__rows li {
    display: flex;
    justify-content: space-between;
    padding: .4rem 0;
    border-bottom: 1px dashed rgba(211,101,21,.15);
    font-size: .9rem;
    color: #444;
}
.ast-article-single .aibd-calculator__value {
    font-weight: 700;
    color: #d36515;
}

/* ---- Lead capture form wrapper ---- */
.ast-article-single .entry-content h2.wp-block-heading + .wp-block-shortcode {
    margin-top: .5rem;
}

/* ---- Shortcode block (forms etc.) ---- */
.ast-article-single .entry-content .wp-block-shortcode {
    margin: 1.5rem 0;
}

/* ---- Blog list page (archive) ---- */
.ast-article-single .entry-content a {
    color: #d36515;
    text-decoration: none;
    transition: color .15s;
}
.ast-article-single .entry-content a:hover {
    color: #b85510;
    text-decoration: underline;
}

/* ---- Dark mode media query (for themes with dark mode) ---- */
@media (prefers-color-scheme: dark) {
    .ast-article-single .entry-content .wp-block-table table td {
        color: #ddd;
    }
    .ast-article-single .entry-content .wp-block-table table tr:nth-child(even) td {
        background: rgba(255,255,255,.04);
    }
    .ast-article-single .entry-content .wp-block-table table tr:hover td {
        background: rgba(255,255,255,.07);
    }
}

/* ---- Mobile responsiveness ---- */
@media (max-width: 480px) {
    .ast-article-single .entry-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    .ast-article-single .entry-content h2 {
        font-size: 1.3rem;
    }
    .ast-article-single .entry-content h3 {
        font-size: 1.1rem;
    }
    .ast-article-single .entry-content .wp-block-table table {
        font-size: .85rem;
    }
    .ast-article-single .entry-content .wp-block-table table th,
    .ast-article-single .entry-content .wp-block-table table td {
        padding: .4rem .5rem;
    }
}