/**
 * Content Lab — Frontend Styles
 *
 * Styles for AI-generated content: columns, FAQ, lists, callouts, tables.
 * Uses CSS custom properties for easy theme customization.
 */

/* ─── Custom Properties ─── */
:root {
    --cl-primary: #2271b1;
    --cl-info-bg: #f0f6fc;
    --cl-info-border: #2271b1;
    --cl-warning-bg: #fef8ee;
    --cl-warning-border: #dba617;
    --cl-tip-bg: #edfaef;
    --cl-tip-border: #00a32a;
    --cl-gap: 2rem;
    --cl-radius: 6px;
}

/* ─── Columns ─── */
.cl-columns {
    display: flex;
    gap: var(--cl-gap);
    margin: 1.5em 0;
}

.cl-column {
    min-width: 0;
}

.cl-column > *:first-child {
    margin-top: 0;
}

.cl-column > *:last-child {
    margin-bottom: 0;
}

/* Column layouts */
.cl-columns-50-50 .cl-column {
    flex: 1;
}

.cl-columns-33-33-33 .cl-column {
    flex: 1;
}

.cl-columns-66-33 .cl-column:first-child {
    flex: 2;
}

.cl-columns-66-33 .cl-column:last-child {
    flex: 1;
}

.cl-columns-33-66 .cl-column:first-child {
    flex: 1;
}

.cl-columns-33-66 .cl-column:last-child {
    flex: 2;
}

/* ─── FAQ (Accordion) ─── */
.cl-faq {
    margin: 1.5em 0;
}

.cl-faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.cl-faq-item:first-child {
    border-top: 1px solid #e0e0e0;
}

.cl-faq-item details {
    margin: 0;
}

.cl-faq-item summary {
    display: flex;
    align-items: center;
    padding: 1em 0;
    font-weight: 600;
    font-size: 1.05em;
    cursor: pointer;
    list-style: none;
    gap: 0.5em;
}

.cl-faq-item summary::-webkit-details-marker {
    display: none;
}

.cl-faq-item summary::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    background: var(--cl-primary);
    color: #fff;
    font-size: 1.1em;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.cl-faq-item details[open] > summary::before {
    content: '−';
}

.cl-faq-item details > div {
    padding: 0 0 1em 2em;
    line-height: 1.7;
}

/* ─── Lists ─── */
.cl-list {
    margin: 1.5em 0;
    padding-left: 0;
    list-style: none;
}

.cl-list li {
    position: relative;
    padding: 0.6em 0 0.6em 1.5em;
    border-bottom: 1px solid #f0f0f1;
    line-height: 1.6;
}

.cl-list li:last-child {
    border-bottom: none;
}

.cl-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.05em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cl-primary);
}

.cl-list li strong {
    color: #1d2327;
}

/* ─── Tables ─── */
.cl-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95em;
}

.cl-table caption {
    caption-side: top;
    font-weight: 600;
    text-align: left;
    margin-bottom: 0.5em;
    font-size: 1.05em;
}

.cl-table th,
.cl-table td {
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.cl-table th {
    background: #f6f7f7;
    font-weight: 600;
    white-space: nowrap;
}

.cl-table tbody tr:hover {
    background: #fafafa;
}

/* ─── Callouts ─── */
.cl-callout {
    margin: 1.5em 0;
    padding: 1.25em 1.5em;
    border-radius: var(--cl-radius);
    border-left: 4px solid;
}

.cl-callout-info {
    background: var(--cl-info-bg);
    border-left-color: var(--cl-info-border);
}

.cl-callout-warning {
    background: var(--cl-warning-bg);
    border-left-color: var(--cl-warning-border);
}

.cl-callout-tip {
    background: var(--cl-tip-bg);
    border-left-color: var(--cl-tip-border);
}

.cl-callout-title {
    font-weight: 700;
    margin-bottom: 0.5em;
    font-size: 1.05em;
}

.cl-callout-content {
    line-height: 1.7;
}

.cl-callout-content > *:last-child {
    margin-bottom: 0;
}

/* ─── CTA ─── */
.cl-cta {
    text-align: center;
    margin: 2em 0;
    padding: 2em;
    background: #f6f7f7;
    border-radius: var(--cl-radius);
}

.cl-cta a,
.cl-cta .cl-cta-button {
    display: inline-block;
    padding: 0.75em 2em;
    background: var(--cl-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--cl-radius);
    font-weight: 600;
    font-size: 1.05em;
    transition: opacity 0.2s;
}

.cl-cta a:hover,
.cl-cta .cl-cta-button:hover {
    opacity: 0.85;
}


/* ─── Responsive ─── */
@media (max-width: 768px) {
    .cl-columns {
        flex-direction: column;
    }

    .cl-columns .cl-column {
        flex: none !important;
    }

    .cl-table {
        font-size: 0.85em;
    }

    .cl-table th,
    .cl-table td {
        padding: 0.5em 0.75em;
    }
}
