/**
 * Theme Color Overrides for Bosfluiter Theme
 * Uses CSS custom properties from theme.json for child theme compatibility
 * 
 * This file overrides hardcoded colors in patterns with theme-aware CSS variables.
 * The parent theme uses amber/gold tones, but child themes can override these
 * by setting different colors in their theme.json.
 */

/* ==========================================================================
   Icon Block Color Overrides
   ========================================================================== 
   The outermost/icon-block plugin uses hardcoded hex values in its attributes.
   We override these with CSS custom properties so child themes can change colors.
*/

/* Override amber-600 (#d97706) icon colors with secondary color */
.wp-block-outermost-icon-block .icon-container.has-icon-color[style*="color:#d97706"],
.wp-block-outermost-icon-block .icon-container.has-icon-color[style*="color: #d97706"] {
    color: var(--wp--preset--color--secondary) !important;
}

/* Override amber-400 (#fbbf24) icon colors with secondary color (used for stars) */
.wp-block-outermost-icon-block .icon-container.has-icon-color[style*="color:#fbbf24"],
.wp-block-outermost-icon-block .icon-container.has-icon-color[style*="color: #fbbf24"] {
    color: var(--wp--preset--color--secondary) !important;
}

/* SVG fill colors - ensure the color is inherited */
.wp-block-outermost-icon-block .icon-container.has-icon-color svg {
    fill: currentColor;
}

/* ==========================================================================
   Text Highlight/Mark Color Overrides
   ========================================================================== 
   Highlighted text (using <mark>) in patterns uses hardcoded amber colors.
   We override these with the secondary theme color.
*/

/* Override amber-200 (#fde68a) mark/highlight colors */
mark[style*="color:#fde68a"],
mark[style*="color: #fde68a"],
.has-inline-color[style*="color:#fde68a"],
.has-inline-color[style*="color: #fde68a"] {
    color: var(--wp--preset--color--secondary) !important;
}

/* Override amber-300 (#fcd34d) mark/highlight colors */
mark[style*="color:#fcd34d"],
mark[style*="color: #fcd34d"],
.has-inline-color[style*="color:#fcd34d"],
.has-inline-color[style*="color: #fcd34d"] {
    color: var(--wp--preset--color--secondary) !important;
}

/* Override amber-400 (#fbbf24) text colors */
mark[style*="color:#fbbf24"],
mark[style*="color: #fbbf24"],
.has-inline-color[style*="color:#fbbf24"],
.has-inline-color[style*="color: #fbbf24"] {
    color: var(--wp--preset--color--secondary) !important;
}

/* ==========================================================================
   Paragraph/Link Color Overrides (white with opacity)
   ========================================================================== 
   Some patterns use #ffffffe6 (white 90% opacity) for text on dark backgrounds.
   This is fine to keep as-is since white text doesn't need theme variation.
   But for completeness, we normalize to rgba.
*/

/* These are intentionally left as-is since white overlay text should remain white
   in any theme. Child themes can override if needed. */

/* ==========================================================================
   Amber Background Classes
   ========================================================================== 
   Override Tailwind's hardcoded bg-amber-* classes with theme colors
*/

/* Override bg-amber-100 (icon background circles) with secondary color at 15% */
.bg-amber-100 {
    background-color: color-mix(in srgb, var(--wp--preset--color--secondary) 15%, white) !important;
}

/* Override bg-amber-500 (badge backgrounds) */
.bg-amber-500 {
    background-color: var(--wp--preset--color--secondary) !important;
}

/* ==========================================================================
   Text Color Classes
   ========================================================================== 
   Override Tailwind's hardcoded text-amber-* classes with theme colors
*/

/* These classes are used for accent text throughout patterns */
.text-amber-300 {
    color: color-mix(in srgb, var(--wp--preset--color--secondary) 70%, white) !important;
}

.text-amber-400 {
    color: var(--wp--preset--color--secondary) !important;
}

.text-amber-600 {
    color: var(--wp--preset--color--secondary) !important;
}
