/**
 * CM Hello World Block - Centralized Styles
 * Enhanced with CSS custom properties and responsive typography
 * CSS Custom Properties injected by config.php via wp_add_inline_style()
 * Values defined in build_global_css_properties() method - SSOT compliance
 */

/* SSOT Two-Selector Pattern with Block Identifier for FSE Compatibility */
.editor-styles-wrapper .wp-block-w4ya-cm-hello-world,
.wp-block-w4ya-cm-hello-world {
    box-sizing: border-box;
    display: block;
    width: 100%;
    clear: both;
    position: relative;
    padding: var(--cm-hello-world-default-padding);
    margin: 0;
    background-color: var(--cm-hello-world-default-bg-color);
    color: var(--cm-hello-world-default-text-color);
    border-radius: var(--cm-hello-world-default-border-radius);
    transition: all 0.3s ease;
}

/* Content Wrapper - Full Width Container */
.editor-styles-wrapper .wp-block-w4ya-cm-hello-world .cm-hello-world-content,
.wp-block-w4ya-cm-hello-world .cm-hello-world-content {
    box-sizing: border-box;
    display: block;
    width: 100%;
    clear: both;
}

/* Message Text - Responsive Typography */
.editor-styles-wrapper .wp-block-w4ya-cm-hello-world .cm-hello-world__message,
.wp-block-w4ya-cm-hello-world .cm-hello-world__message {
    margin: 0;
    padding: 0;
    font-size: var(--cm-hello-world-font-size);
    line-height: var(--cm-hello-world-line-height);
    color: inherit;
}

/* Loaded State - Applied via JavaScript */
.editor-styles-wrapper .wp-block-w4ya-cm-hello-world.cm-hello-world-loaded,
.wp-block-w4ya-cm-hello-world.cm-hello-world-loaded {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Focused Element State - For FSE targeting */
.editor-styles-wrapper .wp-block-w4ya-cm-hello-world .cm-focused-element,
.wp-block-w4ya-cm-hello-world .cm-focused-element {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Hover State - Frontend Only */
.wp-block-w4ya-cm-hello-world.hello-world-hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive States - Applied via JavaScript */
.editor-styles-wrapper .wp-block-w4ya-cm-hello-world.hello-world-mobile,
.wp-block-w4ya-cm-hello-world.hello-world-mobile {
    padding: calc(var(--cm-hello-world-default-padding) * 0.75);
}

.editor-styles-wrapper .wp-block-w4ya-cm-hello-world.hello-world-tablet,
.wp-block-w4ya-cm-hello-world.hello-world-tablet {
    padding: calc(var(--cm-hello-world-default-padding) * 0.875);
}

/* Alignment Classes with SSOT Two-Selector Pattern */
.editor-styles-wrapper .wp-block-w4ya-cm-hello-world.alignleft,
.wp-block-w4ya-cm-hello-world.alignleft {
    float: left;
    margin-right: 1rem;
}

.editor-styles-wrapper .wp-block-w4ya-cm-hello-world.alignright,
.wp-block-w4ya-cm-hello-world.alignright {
    float: right;
    margin-left: 1rem;
}

.editor-styles-wrapper .wp-block-w4ya-cm-hello-world.aligncenter,
.wp-block-w4ya-cm-hello-world.aligncenter {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.editor-styles-wrapper .wp-block-w4ya-cm-hello-world.alignwide,
.wp-block-w4ya-cm-hello-world.alignwide {
    max-width: var(--wp--style--global--wide-size, 1400px);
}

.editor-styles-wrapper .wp-block-w4ya-cm-hello-world.alignfull,
.wp-block-w4ya-cm-hello-world.alignfull {
    max-width: none;
    width: 100%;
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
    .editor-styles-wrapper .wp-block-w4ya-cm-hello-world,
    .wp-block-w4ya-cm-hello-world {
        border: 2px solid currentColor;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .editor-styles-wrapper .wp-block-w4ya-cm-hello-world,
    .wp-block-w4ya-cm-hello-world,
    .wp-block-w4ya-cm-hello-world.hello-world-hover {
        transition: none;
        transform: none;
    }
}

/* Print Styles */
@media print {
    .editor-styles-wrapper .wp-block-w4ya-cm-hello-world,
    .wp-block-w4ya-cm-hello-world {
        background: none !important;
        color: #000 !important;
        border: 1px solid #000;
    }
}
