/**
 * Homeforce Block Extensions - Frontend Styles
 * Responsive flex layout for audience-specific headings with shield icons
 */

/* Flex wrapper for headings with shields */
.homeforce-heading-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
}

/* Heading content container */
.homeforce-heading-wrapper .heading-content {
    flex: 1;
    min-width: 0; /* Prevents text overflow */
}

/* Ensure headings inside flex container display properly */
.homeforce-heading-wrapper h1,
.homeforce-heading-wrapper h2,
.homeforce-heading-wrapper h3,
.homeforce-heading-wrapper h4,
.homeforce-heading-wrapper h5,
.homeforce-heading-wrapper h6 {
    margin: 0;
    padding: 14px 0;
    text-align: center;
    width: 100%;
}

/* Shield container */
.homeforce-heading-wrapper .heading-shield {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Shield image */
.homeforce-heading-wrapper .heading-shield img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Landlord specific styling */
.homeforce-heading-wrapper.audience-landlord h1,
.homeforce-heading-wrapper.audience-landlord h2,
.homeforce-heading-wrapper.audience-landlord h3,
.homeforce-heading-wrapper.audience-landlord h4,
.homeforce-heading-wrapper.audience-landlord h5,
.homeforce-heading-wrapper.audience-landlord h6 {
    color: #2c5aa0;
}

/* Tenant specific styling */
.homeforce-heading-wrapper.audience-tenant h1,
.homeforce-heading-wrapper.audience-tenant h2,
.homeforce-heading-wrapper.audience-tenant h3,
.homeforce-heading-wrapper.audience-tenant h4,
.homeforce-heading-wrapper.audience-tenant h5,
.homeforce-heading-wrapper.audience-tenant h6 {
    color: #27ae60;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .homeforce-heading-wrapper {
        gap: 15px;
        padding: 0 10px;
    }
    
    /* Smaller shield on mobile */
    .homeforce-heading-wrapper .heading-shield img {
        width: 60px;
        height: 60px;
    }
    
    /* Adjust heading text size if needed */
    .homeforce-heading-wrapper h1,
    .homeforce-heading-wrapper h2 {
        font-size: 1.5em;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .homeforce-heading-wrapper {
        gap: 10px;
    }
    
    /* Even smaller shield on very small screens */
    .homeforce-heading-wrapper .heading-shield img {
        width: 50px;
        height: 50px;
    }
    
    /* Further adjust heading size */
    .homeforce-heading-wrapper h1,
    .homeforce-heading-wrapper h2 {
        font-size: 1.3em;
        padding: 10px 0;
    }
}

/* Editor preview styles */
.editor-styles-wrapper .homeforce-heading-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Optional: Add visual indicator for empty shield space in editor */
.editor-styles-wrapper .audience-landlord::after,
.editor-styles-wrapper .audience-tenant::after {
    content: ' [Shield icon will appear here]';
    font-size: 0.8em;
    opacity: 0.5;
    font-style: italic;
}

/* Accessibility - Screen reader text */
.homeforce-heading-wrapper .heading-shield img[alt] {
    /* Image alt text provides context for screen readers */
}

/* Print styles */
@media print {
    .homeforce-heading-wrapper .heading-shield {
        display: none; /* Hide shields when printing to save ink */
    }
    
    .homeforce-heading-wrapper {
        justify-content: center;
    }
}

.homeforce-heading-wrapper .heading-shield {
    margin-top: 50px;
}

/* Additional CSS to remove the shadow around the image */
.homeforce-heading-wrapper .heading-shield img {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}
