/**
 * Text Blocks Module - Frontend styles
 * 
 * @author    Woohoo.pl
 * @copyright 2025 Woohoo.pl
 * @license   https://opensource.org/licenses/AFL-3.0
 */

/* Base text block container */
.wh-textblock {
    box-sizing: border-box;
}

/* Base paragraph styles */
.wh-paragraph {
    box-sizing: border-box;
}

/* Responsive visibility - Desktop only */
.wh-desktop-only {
    display: block;
}

/* Responsive visibility - Mobile only */
.wh-mobile-only {
    display: none;
}

/* Mobile breakpoint (max-width: 768px) */
@media (max-width: 768px) {
    .wh-desktop-only {
        display: none !important;
    }
    
    .wh-mobile-only {
        display: block !important;
    }
}

/* Tablet adjustments (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .wh-desktop-only {
        display: block;
    }
    
    .wh-mobile-only {
        display: none;
    }
}

/* Default heading styles - can be overridden by theme */
.wh-textblock h1.wh-paragraph,
.wh-textblock h2.wh-paragraph,
.wh-textblock h3.wh-paragraph,
.wh-textblock h4.wh-paragraph,
.wh-textblock h5.wh-paragraph,
.wh-textblock h6.wh-paragraph {
    margin-top: 0;
}

.wh-textblock h1.wh-paragraph:last-child,
.wh-textblock h2.wh-paragraph:last-child,
.wh-textblock h3.wh-paragraph:last-child,
.wh-textblock h4.wh-paragraph:last-child,
.wh-textblock h5.wh-paragraph:last-child,
.wh-textblock h6.wh-paragraph:last-child,
.wh-textblock p.wh-paragraph:last-child {
    margin-bottom: 0;
}

/* Blockquote styling */
.wh-textblock blockquote.wh-paragraph {
    padding: 15px 20px;
    margin: 0 0 15px;
    border-left: 4px solid #ddd;
    background-color: #f9f9f9;
}

/* Pre/code styling */
.wh-textblock pre.wh-paragraph {
    padding: 15px;
    margin: 0 0 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* List styling */
.wh-textblock ul.wh-paragraph,
.wh-textblock ol.wh-paragraph {
    padding-left: 20px;
    margin: 0 0 15px;
}

.wh-textblock ul.wh-paragraph li,
.wh-textblock ol.wh-paragraph li {
    margin-bottom: 5px;
}
