/* Bleat Frontend Styles - CHAOTIC REDESIGN */

:root {
    --bleat-yellow: #FFDD02;
    --bleat-gray: #B6B5AD;
    --bleat-black: #000000;
    --bleat-white: #ffffff;
    --bleat-border: 2px;
    --bleat-radius: 4px;
}

/* Main thoughts container - no background, organic layout */
.bleat-thoughts-grid {
    display: block; /* Changed from grid to block for more chaos */
    padding: clamp(20px, 4vw, 40px);
    max-width: 1400px;
    margin: 0 auto;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: none; /* Removed gray background */
}

/* Individual thought items - IMPROVED STRUCTURE */
.bleat-thought-item {
    display: inline-block;
    margin: clamp(8px, 2vw, 15px) clamp(5px, 1.5vw, 12px);
    padding: clamp(8px, 2vw, 20px);
    position: relative;
    transition: all 0.3s ease;
    opacity: 0;
    animation: bleat-fade-in 0.8s ease-out forwards;
    animation-delay: var(--animation-delay, 0ms);
    vertical-align: top;
    max-width: 90%;
    line-height: 1.4;
}

/* Structural spacing classes for better organization */
.bleat-thought-item.structural-section-break {
    margin-top: clamp(25px, 5vw, 45px);
    clear: both;
}

.bleat-thought-item.structural-major-item {
    margin-top: clamp(20px, 4vw, 35px);
    margin-bottom: clamp(15px, 3vw, 25px);
    clear: both;
}

.bleat-thought-item.structural-rhythm-reset {
    margin-top: clamp(18px, 3.5vw, 30px);
}

.bleat-thought-item.structural-small-group {
    margin-top: clamp(5px, 1vw, 8px);
    margin-bottom: clamp(5px, 1vw, 8px);
}

/* Remove all default box styling */
.bleat-thought-item .thought-content {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--bleat-black);
    line-height: 1.3;
}

/* CHAOS VARIANTS - Applied randomly via CSS classes */

/* Typography Chaos */
.bleat-thought-item.style-uppercase {
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.bleat-thought-item.style-lowercase {
    text-transform: lowercase;
    font-style: italic;
    font-weight: 300;
}

.bleat-thought-item.style-title-case {
    text-transform: capitalize;
    font-weight: 600;
}

.bleat-thought-item.style-big {
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 800;
    line-height: 0.9;
}

.bleat-thought-item.style-small {
    font-size: clamp(11px, 2vw, 14px);
    opacity: 0.8;
}

.bleat-thought-item.style-mono {
    font-family: "Courier New", monospace;
    font-size: clamp(12px, 2.5vw, 16px);
}

/* Layout Chaos - WITH BETTER READABILITY */
.bleat-thought-item.layout-float-left {
    float: left;
    margin-right: clamp(15px, 3vw, 25px);
    margin-bottom: clamp(10px, 2vw, 15px);
    clear: none;
}

.bleat-thought-item.layout-float-right {
    float: right;
    margin-left: clamp(15px, 3vw, 25px);
    margin-bottom: clamp(10px, 2vw, 15px);
    clear: none;
}

.bleat-thought-item.layout-center {
    display: block;
    text-align: center;
    margin: clamp(25px, 5vw, 40px) auto;
    max-width: 75%;
    clear: both;
}

.bleat-thought-item.layout-full-width {
    display: block;
    width: 100%;
    margin: clamp(30px, 6vw, 50px) 0;
    text-align: center;
    font-size: clamp(18px, 3vw, 32px);
    font-weight: 700;
    clear: both;
    max-width: 85ch; /* Better line length control */
    margin-left: auto;
    margin-right: auto;
}

.bleat-thought-item.layout-indent {
    margin-left: clamp(30px, 6vw, 80px);
    max-width: 70%;
}

.bleat-thought-item.layout-hanging {
    text-indent: -1.5em;
    padding-left: 1.5em;
    max-width: 80%;
}

/* Rotation Chaos */
.bleat-thought-item.rotate-slight {
    transform: rotate(-2deg);
}

.bleat-thought-item.rotate-more {
    transform: rotate(3deg);
}

.bleat-thought-item.rotate-wild {
    transform: rotate(-5deg) scale(1.1);
}

/* Visual Style Chaos - WITH BETTER STRUCTURE */
.bleat-thought-item.visual-boxed {
    background: var(--bleat-white);
    border: 3px solid var(--bleat-black);
    border-radius: var(--bleat-radius);
    padding: clamp(12px, 3vw, 20px);
    box-shadow: 4px 4px 0 var(--bleat-black);
    margin: clamp(10px, 2vw, 18px);
    max-width: 85%;
}

.bleat-thought-item.visual-underlined {
    border-bottom: 3px solid var(--bleat-black);
    padding-bottom: 8px;
    margin-bottom: clamp(12px, 2.5vw, 20px);
}

.bleat-thought-item.visual-circled {
    border: 2px solid var(--bleat-black);
    border-radius: 25px;
    padding: clamp(8px, 2vw, 15px) clamp(15px, 3vw, 25px);
    display: inline-block;
    margin: clamp(8px, 2vw, 15px);
}

.bleat-thought-item.visual-highlighted {
    background: var(--bleat-yellow);
    padding: clamp(10px, 2vw, 16px) clamp(12px, 2.5vw, 18px);
    display: inline-block;
    line-height: 1.6;
    margin: clamp(8px, 2vw, 15px);
    border-radius: 3px;
}

.bleat-thought-item.visual-shadow {
    text-shadow: 3px 3px 0 var(--bleat-yellow);
    font-weight: 700;
    margin: clamp(10px, 2vw, 18px);
}

/* REMOVED - This was the hard-to-read stroke effect */
/* 
.bleat-thought-item.visual-outline {
    color: var(--bleat-white);
    text-shadow: 
        -1px -1px 0 var(--bleat-black),
        1px -1px 0 var(--bleat-black),
        -1px 1px 0 var(--bleat-black),
        1px 1px 0 var(--bleat-black);
    font-weight: 700;
}
*/

/* Word-level chaos - applied to individual words */
.chaos-word-yellow {
    background: var(--bleat-yellow);
    padding: 2px 4px;
    margin: 0 1px;
}

.chaos-word-big {
    font-size: 1.5em;
    font-weight: 800;
}

.chaos-word-small {
    font-size: 0.7em;
    opacity: 0.7;
}

.chaos-word-caps {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.chaos-word-italic {
    font-style: italic;
    color: #666;
}

.chaos-word-indent {
    margin-left: 2em;
    display: inline-block;
}

/* Sentiment-based styling */
.bleat-thought-item[data-sentiment="sarcastic"] {
    font-style: italic;
    opacity: 0.9;
}

.bleat-thought-item[data-sentiment="intense"] .thought-content {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bleat-thought-item[data-sentiment="questioning"] {
    color: #444;
}

.bleat-thought-item[data-sentiment="questioning"]:after {
    content: "?";
    color: var(--bleat-yellow);
    font-size: 1.5em;
    font-weight: 900;
    margin-left: 5px;
}

.bleat-thought-item[data-sentiment="philosophical"] {
    font-style: italic;
    color: #555;
    line-height: 1.5;
}

/* Hover effects */
.bleat-thought-item:hover {
    z-index: 100;
    cursor: pointer;
}

.bleat-thought-item.visual-boxed:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 var(--bleat-black);
}

.bleat-thought-item.visual-highlighted:hover {
    background: var(--bleat-yellow);
    box-shadow: 0 0 20px rgba(255, 221, 2, 0.5);
}

/* Animations */
@keyframes bleat-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Clear floats */
.bleat-thoughts-grid::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bleat-thought-item.layout-float-left,
    .bleat-thought-item.layout-float-right {
        float: none;
        display: block;
        margin: 15px 0;
    }
    
    .bleat-thought-item.layout-indent {
        margin-left: 20px;
    }
    
    .bleat-thought-item.style-big {
        font-size: clamp(18px, 6vw, 32px);
    }
}

/* Remove date display */
.thought-meta {
    display: none !important;
}

/* Ensure text is always readable */
.bleat-thought-item .thought-content p {
    margin: 0;
    padding: 0;
}

/* Yellow treatments - different ways to use yellow */
.bleat-thought-item.yellow-background {
    background: var(--bleat-yellow) !important;
    padding: 12px 16px;
    border-radius: var(--bleat-radius);
}

.bleat-thought-item.yellow-shadow .thought-content {
    text-shadow: 3px 3px 0 var(--bleat-yellow);
    font-weight: 700;
}

.bleat-thought-item.yellow-underline {
    border-bottom: 4px solid var(--bleat-yellow);
    padding-bottom: 8px;
}

.bleat-thought-item.yellow-border {
    border: 3px solid var(--bleat-yellow);
    padding: 12px;
    border-radius: var(--bleat-radius);
}

.bleat-thought-item.yellow-highlight .chaos-word-yellow {
    background: var(--bleat-yellow);
    padding: 2px 5px;
    margin: 0 1px;
    border-radius: 2px;
}

/* Ensure yellow treatments work with visual styles */
.bleat-thought-item.visual-boxed.yellow-background {
    background: var(--bleat-yellow) !important;
    border: 3px solid var(--bleat-black);
}

.bleat-thought-item.visual-highlighted.yellow-background {
    background: var(--bleat-yellow) !important;
}