/* CMS TextBlock Component Styles */

/* ==========================================
   Base TextBlock Styling
   ========================================== */
.cms-text-block {
    min-height: 60px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.cms-text-block-content {
    line-height: 1.6;
}

/* Placeholder for empty content */
.cms-text-block-placeholder {
    color: #999;
    font-style: italic;
    padding: 16px;
    text-align: center;
}

/* ==========================================
   Heading Level Styles
   ========================================== */
.cms-text-block.heading-h1 {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.2;
}

.cms-text-block.heading-h2 {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.3;
}

.cms-text-block.heading-h3 {
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.4;
}

.cms-text-block.heading-h4 {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
}

.cms-text-block.heading-h5 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
}

.cms-text-block.heading-h6 {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ==========================================
   Font Weight
   ========================================== */
.cms-text-block.font-weight-bold {
    font-weight: 700 !important;
}

/* ==========================================
   Quill Editor Styling
   ========================================== */
.cms-text-block-editor {
    min-height: 200px;
}

.cms-text-block-editor .ql-container {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

.cms-text-block-editor .ql-editor {
    min-height: 150px;
}

.cms-text-block-editor .ql-toolbar {
    background-color: #f5f5f5;
    border-radius: 4px 4px 0 0;
}

/* ==========================================
   Responsive Font Sizing
   ========================================== */
@media (max-width: 959px) {
    /* xs-sm: Scale down 10% */
    .cms-text-block.heading-h1 {
        font-size: 2.25rem;
    }

    .cms-text-block.heading-h2 {
        font-size: 1.8rem;
    }

    .cms-text-block.heading-h3 {
        font-size: 1.575rem;
    }

    .cms-text-block.heading-h4 {
        font-size: 1.35rem;
    }

    .cms-text-block.heading-h5 {
        font-size: 1.125rem;
    }

    .cms-text-block.heading-h6 {
        font-size: 1rem;
    }
}

/* ==========================================
   Rich Text Content Styling
   ========================================== */
.cms-text-block-content h1,
.cms-text-block-content h2,
.cms-text-block-content h3,
.cms-text-block-content h4,
.cms-text-block-content h5,
.cms-text-block-content h6 {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    font-weight: 500;
}

.cms-text-block-content p {
    margin-bottom: 1em;
}

.cms-text-block-content p:last-child {
    margin-bottom: 0;
}

.cms-text-block-content ul,
.cms-text-block-content ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.cms-text-block-content li {
    margin-bottom: 0.5em;
}

.cms-text-block-content a {
    color: #0d5d2c;
    text-decoration: underline;
}

.cms-text-block-content a:hover {
    color: #f0b323;
}

.cms-text-block-content strong {
    font-weight: 700;
}

.cms-text-block-content em {
    font-style: italic;
}

.cms-text-block-content blockquote {
    border-left: 4px solid #0d5d2c;
    padding-left: 16px;
    margin-left: 0;
    margin-bottom: 1em;
    color: #666;
    font-style: italic;
}

/* ==========================================
   Edit Mode Hover Effect
   ========================================== */
.cms-text-block:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   Accessibility
   ========================================== */
.cms-text-block:focus-within {
    outline: 2px solid #f0b323;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cms-text-block {
        transition: none;
    }
}
