/* ==========================================================================
   Article Content Styling — flavor-content
   Styles the_content() output including Gutenberg blocks
   ========================================================================== */

.flavor-content {
    color: #374151;
    line-height: 1.8;
    font-size: 1.0625rem;
}

/* Headings */
.flavor-content h2 {
    font-size: 1.625rem;
    font-weight: 700;
    color: #111827;
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.flavor-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 2rem 0 0.75rem;
    line-height: 1.4;
}

.flavor-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 0.5rem;
}

/* Paragraphs */
.flavor-content p {
    margin: 0 0 1.25rem;
}

/* Links */
.flavor-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: #93c5fd;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.flavor-content a:hover {
    color: #1d4ed8;
    text-decoration-color: #2563eb;
}

/* Lists */
.flavor-content ul,
.flavor-content ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

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

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

.flavor-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.flavor-content li::marker {
    color: #9ca3af;
}

/* Bold & Italic */
.flavor-content strong {
    font-weight: 600;
    color: #111827;
}

/* Blockquotes */
.flavor-content blockquote {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: normal;
    color: #1e40af;
}

.flavor-content blockquote p {
    margin: 0;
}

/* Code — inline */
.flavor-content code {
    background: #f1f5f9;
    color: #be185d;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Code — blocks (only direct article pre, not inside tool components) */
.flavor-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Reset pre inside tool components */
.flavor-content .json-tool pre {
    background: transparent !important;
    color: inherit !important;
    margin: 0 !important;
    padding: 1rem !important;
    border-radius: 0 !important;
    border: none !important;
}

.flavor-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* Tables */
.flavor-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.flavor-content thead th {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.flavor-content tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.flavor-content tbody tr:hover {
    background: #f9fafb;
}

/* Images / Figures */
.flavor-content figure {
    margin: 2rem 0;
}

.flavor-content figure img,
.flavor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.flavor-content figcaption {
    text-align: center;
    font-size: 0.8125rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Horizontal rule */
.flavor-content hr {
    border: none;
    height: 1px;
    background: #e5e7eb;
    margin: 2rem 0;
}

/* FAQ section (common in articles) */
.flavor-content .faq-section h3,
.flavor-content h3:has(+ p) {
    scroll-margin-top: 80px;
}

/* WP Block specific overrides */
.flavor-content .wp-block-image {
    margin: 2rem 0;
}

.flavor-content .wp-block-heading {
    scroll-margin-top: 80px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .flavor-content {
        font-size: 1rem;
    }

    .flavor-content h2 {
        font-size: 1.375rem;
    }

    .flavor-content h3 {
        font-size: 1.125rem;
    }

    .flavor-content pre {
        padding: 1rem;
        font-size: 0.8125rem;
        border-radius: 0.5rem;
    }

    .flavor-content table {
        font-size: 0.875rem;
    }

    .flavor-content thead th,
    .flavor-content tbody td {
        padding: 0.5rem 0.75rem;
    }
}

/* line-clamp utility (for blog cards) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Form Elements — Restore styles reset by Tailwind Preflight
   Needed for UTM Builder and other tool pages with inline CSS
   ========================================================================== */

.flavor-content input[type="text"],
.flavor-content input[type="url"],
.flavor-content input[type="email"],
.flavor-content input[type="number"],
.flavor-content input[type="password"],
.flavor-content input[type="search"],
.flavor-content input[type="tel"],
.flavor-content textarea,
.flavor-content select {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    width: 100%;
    background: #fff;
    color: #1f2937;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.flavor-content input:focus,
.flavor-content textarea:focus,
.flavor-content select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.flavor-content input::placeholder,
.flavor-content textarea::placeholder {
    color: #9ca3af;
}

.flavor-content button,
.flavor-content input[type="submit"],
.flavor-content input[type="button"] {
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.flavor-content label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}
