/* ========================================
   RFN HEADER BLOCK STYLES
   ======================================== */

.rfn-header-block {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.rfn-header-block .accent-container {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
}

.rfn-header-block .header-wrapper {
    max-width: 100%;
    box-sizing: border-box;
}

.rfn-header-block .rfn-header-title {
    margin: 0;
    line-height: 1.2;
    font-weight: 600;
    position: relative;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    box-sizing: border-box;
}

/* Accent line styles */
.rfn-header-block .desktop-accent,
.rfn-header-block .mobile-accent {
    border-radius: 2px;
}

/* Desktop accent line - show by default, hide on mobile */
.rfn-header-block .desktop-accent {
    display: block;
}

/* Mobile accent line - hide by default, show on mobile */
.rfn-header-block .mobile-accent {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: -9999px;
}

/* Accent escape functionality */
.rfn-header-block .accent-escape-enabled .desktop-accent {
    position: absolute;
    z-index: 1;
}

/* Header Size Variations */
.rfn-header-block .rfn-header-title.visual-size-xs {
    font-size: 1.25rem;
}

.rfn-header-block .rfn-header-title.visual-size-small {
    font-size: 1.5rem;
}

.rfn-header-block .rfn-header-title.visual-size-medium {
    font-size: 2rem;
}

.rfn-header-block .rfn-header-title.visual-size-large {
    font-size: 2.5rem;
}

.rfn-header-block .rfn-header-title.visual-size-xl {
    font-size: 3rem;
}

/* First Block Spacing */
.rfn-header-block.first-block-spacing-none {
    margin-top: 0;
}

.rfn-header-block.first-block-spacing-small {
    margin-top: 1rem;
}

.rfn-header-block.first-block-spacing-normal {
    margin-top: 2rem;
}

.rfn-header-block.first-block-spacing-large {
    margin-top: 3rem;
}

.rfn-header-block.first-block-spacing-xlarge {
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Ensure container doesn't overflow on mobile */
    .rfn-header-block {
        width: 100%;
        max-width: 100vw;
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Hide desktop accent, show mobile accent */
    .rfn-header-block .desktop-accent {
        display: none !important;
        visibility: hidden;
        opacity: 0;
        position: absolute;
        left: -9999px;
    }
    
    .rfn-header-block .mobile-accent {
        display: block !important;
        visibility: visible;
        opacity: 1;
        position: static;
        left: auto;
    }
    
    /* Ensure header text wraps properly on mobile */
    .rfn-header-block .rfn-header-title {
        max-width: 100%;
        width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    /* Ensure accent container respects width on mobile */
    .rfn-header-block .accent-container {
        max-width: 100%;
        width: 100%;
    }
    
    /* Mobile font size overrides */
    .rfn-header-block .rfn-header-title.visual-size-xl {
        font-size: 1.75rem;
    }
    
    .rfn-header-block .rfn-header-title.visual-size-large {
        font-size: 1.5rem;
    }
    
    .rfn-header-block .rfn-header-title.visual-size-medium {
        font-size: 1.25rem;
    }
    
    .rfn-header-block .rfn-header-title.visual-size-small {
        font-size: 1.1rem;
    }
    
    .rfn-header-block .rfn-header-title.visual-size-xs {
        font-size: 1rem;
    }
    
    /* Custom mobile font size */
    .rfn-header-block .rfn-header-title[style*="--mobile-font-size"] {
        font-size: var(--mobile-font-size) !important;
    }
}

@media (max-width: 576px) {
    /* Extra small mobile adjustments */
    .rfn-header-block .rfn-header-title.visual-size-xs {
        font-size: 1rem;
    }
    
    .rfn-header-block .rfn-header-title.visual-size-small {
        font-size: 1.1rem;
    }
    
    .rfn-header-block .rfn-header-title.visual-size-medium {
        font-size: 1.25rem;
    }
    
    .rfn-header-block .rfn-header-title.visual-size-large {
        font-size: 1.5rem;
    }
    
    .rfn-header-block .rfn-header-title.visual-size-xl {
        font-size: 1.75rem;
    }
}
