/* 
Theme Name: Insuffle v2 - Radical Adapter
Description: Aggressive overrides to force legacy Gutenberg content into the Radical design system.
Strategy: CLEAN DARK RESET. Remove legacy backgrounds, enforce dark mode, use borders for structure.
*/

/* === COLORS & VARIABLES === */
:root {
    --radical-dark: #02040a;
    --radical-primary: #1f3a8b;
    --radical-accent: #ffde59;
    --radical-glass: rgba(255, 255, 255, 0.03);
    --radical-border: rgba(255, 255, 255, 0.1);
    --radical-text-main: #F8FAFC;
    --radical-text-muted: #94a3b8;
}

/* === GLOBAL RESET (Targeting .prose context) === */

/* 1. REMOVE BACKGROUNDS from legacy containers to avoid "Box in a Box" clutter */
.prose .has-white-background-color,
.prose .has-background[style*="ffffff"],
.prose .has-background[style*="white"],
.prose .has-accent-background-color,
.prose .has-primary-background-color,
.prose .has-subtle-background-color,
.prose .tw-cols-card .wp-block-column,
.prose .tw-cols-card-shadow .wp-block-column {
    background-color: transparent !important;
    /* Let the dark theme breathe */
    box-shadow: none !important;
    /* Remove old shadows */
    border: none !important;
    /* Remove old borders */
    padding: 0 !important;
    /* Reset padding if it causes layout issues */
}

/* 2. ADD STRUCTURE via Borders (Radical Style) */
/* Only add borders to specific "Card" columns to separate them subtly */
.prose .tw-cols-card .wp-block-column,
.prose .tw-cols-card-shadow .wp-block-column {
    border: 1px solid var(--radical-border) !important;
    border-radius: 0.5rem !important;
    padding: 2rem !important;
    /* Restore padding for cards */
    background-color: rgba(255, 255, 255, 0.02) !important;
    /* Extremely subtle tint */
    transition: all 0.3s ease !important;
}

.prose .tw-cols-card .wp-block-column:hover,
.prose .tw-cols-card-shadow .wp-block-column:hover {
    border-color: var(--radical-primary) !important;
    background-color: rgba(31, 58, 139, 0.1) !important;
    transform: translateY(-5px) !important;
}

/* 3. ENFORCE TEXT COLORS (White/Grey) */
/* Force ALL text inside these containers to be readable on dark background */
.prose .has-white-background-color *,
.prose .has-background *,
.prose .tw-cols-card .wp-block-column * {
    color: var(--radical-text-main) !important;
}

/* Headings -> White or Accent */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6,
.prose .wp-block-heading {
    color: #ffffff !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

/* Specific Highlight Colors for Headings inside "Cards" */
.prose .tw-cols-card .wp-block-column h3,
.prose .has-accent-background-color h2,
.prose .has-primary-background-color h2 {
    color: var(--radical-accent) !important;
}

/* 4. BUTTONS (Clean & Consistent) */
.prose .wp-block-button__link,
.wp-block-button__link {
    background-color: var(--radical-primary) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.25rem !important;
    padding: 1rem 2rem !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    /* No hard shadows */
}

.prose .wp-block-button__link:hover,
.wp-block-button__link:hover {
    background-color: var(--radical-accent) !important;
    color: var(--radical-dark) !important;
    border-color: var(--radical-accent) !important;
    box-shadow: 0 0 20px rgba(255, 222, 89, 0.4) !important;
    /* Neon Glow */
}

/* 5. SEPARATORS & LINES */
.prose hr,
.wp-block-separator {
    background-color: var(--radical-border) !important;
    height: 1px !important;
    border: none !important;
    margin: 3rem 0 !important;
}

/* 6. LISTS (Custom Icons) */
.prose ul {
    list-style: none !important;
    padding-left: 0 !important;
}

.prose ul li {
    position: relative !important;
    padding-left: 2rem !important;
    margin-bottom: 1rem !important;
    color: var(--radical-text-muted) !important;
}

/* Default bullet is a small dot or arrow */
.prose ul li::before {
    content: '•' !important;
    position: absolute !important;
    left: 0.5rem !important;
    color: var(--radical-primary) !important;
    font-weight: bold !important;
}

/* Specific list styles */
.prose ul.is-style-tw-arrow li::before {
    content: '→' !important;
    color: var(--radical-accent) !important;
}

.prose ul.is-style-tw-checkmark li::before {
    content: '✓' !important;
    color: var(--radical-primary) !important;
}

/* 7. MEDIA & IMAGES */
.prose figure img,
.prose .wp-block-image img {
    border-radius: 0.5rem !important;
    border: 1px solid var(--radical-border) !important;
}

/* Media Text Overlap -> Clean Dark Card */
.prose .wp-block-media-text.is-style-tw-overlap .wp-block-media-text__content {
    background-color: rgba(2, 4, 10, 0.9) !important;
    border: 1px solid var(--radical-border) !important;
    padding: 3rem !important;
    border-radius: 0.5rem !important;
}

/* 8. TABLES (Clean) */
.prose table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 2rem 0 !important;
    border: 1px solid var(--radical-border) !important;
}

.prose th {
    background-color: rgba(31, 58, 139, 0.1) !important;
    color: var(--radical-accent) !important;
    padding: 1rem !important;
    text-align: left !important;
    border-bottom: 1px solid var(--radical-border) !important;
}

.prose td {
    padding: 1rem !important;
    border-bottom: 1px solid var(--radical-border) !important;
    color: var(--radical-text-main) !important;
}

/* 9. LINKS */
.prose a:not(.wp-block-button__link) {
    color: var(--radical-accent) !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 222, 89, 0.3) !important;
    transition: all 0.2s !important;
}

.prose a:not(.wp-block-button__link):hover {
    border-bottom-color: var(--radical-accent) !important;
    text-shadow: 0 0 10px rgba(255, 222, 89, 0.3) !important;
}

/* === EXCEPTION: Single Blog Posts (White Background) === */
/* Force dark text for standard blog posts which have a white content area */
.single-post .prose h1 {
    color: #02040a !important;
    font-size: 2.5rem !important;
    /* 40px */
    line-height: 1.1 !important;
}

.single-post .prose h2 {
    color: #02040a !important;
    font-size: 2rem !important;
    /* 32px */
    line-height: 1.2 !important;
}

.single-post .prose h3 {
    color: #02040a !important;
    font-size: 1.5rem !important;
    /* 24px */
}

.single-post .prose h4,
.single-post .prose h5,
.single-post .prose h6 {
    color: #02040a !important;
    font-size: 1.25rem !important;
    /* 20px */
}

.single-post .prose .wp-block-heading {
    color: #02040a !important;
    /* Fallback if specific tag isn't targeted, though usually it is */
}

.single-post .prose p,
.single-post .prose li,
.single-post .prose strong {
    color: #334155 !important;
    /* Slate 700 */
}

/* === EXCEPTION: White Containers (Contact Form, etc.) === */
/* Ensure text is visible on explicitly white backgrounds */
.bg-white *,
.bg-white h1,
.bg-white h2,
.bg-white h3,
.bg-white h4,
.bg-white h5,
.bg-white h6,
.bg-white p,
.bg-white li,
.bg-white label,
.bg-white input,
.bg-white textarea {
    color: #02040a !important;
    /* Brand Dark */
}