/**
 * Native WooCommerce Checkout Block Field Styling
 * Text Domain: checkout-fields-block
 * STRICTLY SCOPED to Checkout Fields Block ONLY.
 * Prefix: yeekit_cfb
 */

/* -------------------------------------------------------------------------
 * Container Layout: Flexbox wrapper for custom fields
 * Supports modern :has() and JS class fallback
 * ------------------------------------------------------------------------- */
:has(> .yeekit-cfb-field-container),
.yeekit-cfb-parent-container,
.wp-block-woocommerce-checkout-shipping-address-block:has(.yeekit-cfb-field-container),
.wp-block-woocommerce-checkout-billing-address-block:has(.yeekit-cfb-field-container),
.wp-block-woocommerce-checkout-fields-block:has(.yeekit-cfb-field-container),
.wp-block-woocommerce-checkout-additional-information-block:has(.yeekit-cfb-field-container),
.editor-styles-wrapper :has(> .yeekit-cfb-field-container),
.editor-styles-wrapper .block-editor-block-list__layout:has(> .yeekit-cfb-field-container),
.block-editor-block-list__layout:has(> [data-type^="checkout-fields-block/"]) {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 12px !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

/* Ensure any non-custom sibling (such as "Use same address for billing" checkbox or address form)
 * takes 100% width so custom fields start on their own fresh row
 */
:has(> .yeekit-cfb-field-container) > :not(.yeekit-cfb-field-container),
.yeekit-cfb-parent-container > :not(.yeekit-cfb-field-container),
.wp-block-woocommerce-checkout-shipping-address-block > :not(.yeekit-cfb-field-container),
.wp-block-woocommerce-checkout-billing-address-block > :not(.yeekit-cfb-field-container),
.wc-block-checkout__shipping-fields .wc-block-components-checkbox,
.wc-block-checkout__billing-fields .wc-block-components-checkbox {
    flex: 0 0 100% !important;
    width: 100% !important;
}

/* Spacing and base layout - ONLY custom fields */
.yeekit-cfb-field-container,
[class*="wp-block-checkout-fields-block"] {
    position: relative;
    box-sizing: border-box !important;
    vertical-align: top !important;
    margin-top: 12px !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
}

/* -------------------------------------------------------------------------
 * Field Width Options: 100%, 50%, 33%
 * Strictly scoped to our blocks only
 * ------------------------------------------------------------------------- */
.yeekit-cfb-field-container.yeekit-cfb-width-100:not(.yeekit-cfb-hidden):not([data-conditional-hidden="true"]),
[class*="wp-block-checkout-fields-block"].yeekit-cfb-width-100:not(.yeekit-cfb-hidden):not([data-conditional-hidden="true"]) {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    display: block !important;
    clear: both !important;
    margin-right: 0 !important;
}

.yeekit-cfb-field-container.yeekit-cfb-width-50:not(.yeekit-cfb-hidden):not([data-conditional-hidden="true"]),
[class*="wp-block-checkout-fields-block"].yeekit-cfb-width-50:not(.yeekit-cfb-hidden):not([data-conditional-hidden="true"]) {
    width: calc(50% - 6px) !important;
    max-width: calc(50% - 6px) !important;
    flex: 0 0 calc(50% - 6px) !important;
    box-sizing: border-box !important;
    display: block !important;
    clear: none !important;
    margin-right: 0 !important;
}

/* One Third Width: 33.333% */
.yeekit-cfb-field-container.yeekit-cfb-width-33:not(.yeekit-cfb-hidden):not([data-conditional-hidden="true"]),
[class*="wp-block-checkout-fields-block"].yeekit-cfb-width-33:not(.yeekit-cfb-hidden):not([data-conditional-hidden="true"]) {
    width: calc(33.333% - 8px) !important;
    max-width: calc(33.333% - 8px) !important;
    flex: 0 0 calc(33.333% - 8px) !important;
    box-sizing: border-box !important;
    display: block !important;
    clear: none !important;
    margin-right: 0 !important;
}

/* Fallback for non-flex environments (pure float) */
:not(.yeekit-cfb-parent-container):not(:has(> .yeekit-cfb-field-container)) > .yeekit-cfb-field-container.yeekit-cfb-width-50 {
    display: inline-block !important;
    float: left !important;
    margin-right: 12px !important;
}
:not(.yeekit-cfb-parent-container):not(:has(> .yeekit-cfb-field-container)) > .yeekit-cfb-field-container.yeekit-cfb-width-50:nth-of-type(2n) {
    margin-right: 0 !important;
}

/* Mobile responsive fallback: stack custom fields full width on small screens */
@media (max-width: 600px) {

    .yeekit-cfb-field-container.yeekit-cfb-width-50,
    .yeekit-cfb-field-container.yeekit-cfb-width-33,
    [class*="wp-block-checkout-fields-block"].yeekit-cfb-width-50,
    [class*="wp-block-checkout-fields-block"].yeekit-cfb-width-33 {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        display: block !important;
    }
}

@container (max-width: 519px) {

    .yeekit-cfb-field-container.yeekit-cfb-width-50,
    .yeekit-cfb-field-container.yeekit-cfb-width-33,
    [class*="wp-block-checkout-fields-block"].yeekit-cfb-width-50,
    [class*="wp-block-checkout-fields-block"].yeekit-cfb-width-33 {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        display: block !important;
    }
}

/* Ensure smooth label transition - ONLY for floating labels in CFB text/select fields */
.yeekit-cfb-field-container.wc-block-components-text-input:not(.yeekit-cfb-radio-container):not(.wc-block-components-checkbox) > label,
.yeekit-cfb-field-container.wc-block-components-select-input > label {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    pointer-events: none !important;
    position: absolute !important;
    left: 12px !important;
    top: 6px !important;
    transform: scale(0.82) !important;
    transform-origin: top left !important;
    z-index: 1 !important;
}

/* Float label UP to top - ONLY for CFB text/select/date fields */
.yeekit-cfb-field-container.wc-block-components-text-input:not(.yeekit-cfb-radio-container):not(.wc-block-components-checkbox).is-active > label,
.yeekit-cfb-field-container.wc-block-components-text-input:not(.yeekit-cfb-radio-container):not(.wc-block-components-checkbox):focus-within > label,
.yeekit-cfb-field-container.wc-block-components-text-input:not(.yeekit-cfb-radio-container):not(.wc-block-components-checkbox) input:focus ~ label,
.yeekit-cfb-field-container.wc-block-components-text-input:not(.yeekit-cfb-radio-container):not(.wc-block-components-checkbox) input:not(:placeholder-shown) ~ label,
.yeekit-cfb-field-container.wc-block-components-text-input:not(.yeekit-cfb-radio-container):not(.wc-block-components-checkbox) textarea:focus ~ label,
.yeekit-cfb-field-container.wc-block-components-text-input:not(.yeekit-cfb-radio-container):not(.wc-block-components-checkbox) textarea:not(:placeholder-shown) ~ label,
.yeekit-cfb-field-container.wc-block-components-select-input > label,
.yeekit-cfb-field-container:has(input[type="date"]) > label,
.yeekit-cfb-field-container:has(input[type="time"]) > label,
.yeekit-cfb-field-container:has(input[type="datetime-local"]) > label {
    top: 6px !important;
    transform: scale(0.82) !important;
}

/* Adjust input padding when active / focused / filled - for CFB text and select inputs */
.yeekit-cfb-field-container.wc-block-components-text-input.is-active input.wc-block-components-text-input__input,
.yeekit-cfb-field-container.wc-block-components-text-input:focus-within input.wc-block-components-text-input__input,
.yeekit-cfb-field-container.wc-block-components-text-input input.wc-block-components-text-input__input:focus,
.yeekit-cfb-field-container.wc-block-components-text-input input.wc-block-components-text-input__input:not(:placeholder-shown),
.yeekit-cfb-field-container.wc-block-components-select-input select.wc-block-components-select-input__select,
.yeekit-cfb-field-container select.wc-block-components-select-input__select {
    padding-top: 24px !important;
    padding-bottom: 8px !important;
}

/* Textarea Input Styling */
.yeekit-cfb-field-container textarea.yeekit-cfb-textarea,
.yeekit-cfb-field-container textarea {
    background-color: #fff;
    border: 1px solid color-mix(in srgb, currentColor 80%, transparent);
    border-radius: 4px;
    box-sizing: border-box !important;
    color: #2b2d2f;
    font-family: inherit;
    font-size: 16px;
    min-height: 85px !important;
    line-height: 1.5;
    margin: 0;
    padding: 24px 12px 8px 12px !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    resize: vertical;
}

.yeekit-cfb-field-container.yeekit-cfb-has-textarea label,
.yeekit-cfb-field-container textarea ~ label {
    top: 6px !important;
    transform: scale(0.82) !important;
}

/* Date, Time, Datetime Input Styling - Full Width for CFB Date Field */
.yeekit-cfb-field-container input[type="date"],
.yeekit-cfb-field-container input[type="time"],
.yeekit-cfb-field-container input[type="datetime-local"],
[class*="wp-block-checkout-fields-block"] input[type="date"],
[class*="wp-block-checkout-fields-block"] input[type="time"],
[class*="wp-block-checkout-fields-block"] input[type="datetime-local"] {
    background-color: #fff;
    border: 1px solid color-mix(in srgb, currentColor 80%, transparent);
    border-radius: 4px;
    box-sizing: border-box !important;
    color: #2b2d2f;
    font-family: inherit;
    font-size: 16px;
    height: 50px !important;
    min-height: 50px !important;
    line-height: 25px;
    margin: 0;
    padding: 16px 12px;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.yeekit-cfb-field-container.is-active input[type="date"],
.yeekit-cfb-field-container.is-active input[type="time"],
.yeekit-cfb-field-container.is-active input[type="datetime-local"],
.yeekit-cfb-field-container:focus-within input[type="date"],
.yeekit-cfb-field-container:focus-within input[type="time"],
.yeekit-cfb-field-container:focus-within input[type="datetime-local"],
.yeekit-cfb-field-container input[type="date"]:focus,
.yeekit-cfb-field-container input[type="time"]:focus,
.yeekit-cfb-field-container input[type="datetime-local"]:focus,
[class*="wp-block-checkout-fields-block"].is-active input[type="date"],
[class*="wp-block-checkout-fields-block"].is-active input[type="time"],
[class*="wp-block-checkout-fields-block"].is-active input[type="datetime-local"] {
    padding-top: 24px !important;
    padding-bottom: 8px !important;
}

/* Radio Button Group Styling - WooCommerce Native Aesthetic */
.yeekit-cfb-radio-container {
    box-sizing: border-box !important;
}

.yeekit-cfb-radio-fieldset {
    border: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.yeekit-cfb-radio-legend {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
    padding: 0;
    display: block;
    width: 100%;
}

.yeekit-cfb-radio-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yeekit-cfb-radio-options-list.is-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 16px;
}

/* Radio Options Container & Items */
.yeekit-cfb-radio-container,
.yeekit-cfb-radio-fieldset,
.yeekit-cfb-radio-legend,
.yeekit-cfb-radio-options-list,
.yeekit-cfb-radio-option-item,
.yeekit-cfb-radio-input,
.yeekit-cfb-radio-text {
    pointer-events: auto !important;
}

.yeekit-cfb-radio-option-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer !important;
    pointer-events: auto !important;
    font-size: 14px;
    color: #2b2d2f;
    margin: 0;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
    border-radius: 4px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.yeekit-cfb-radio-option-item:hover {
    border-color: #000;
    background-color: #f8fafc;
}

.yeekit-cfb-radio-option-item.is-selected {
    border-color: #000;
    background-color: #f1f5f9;
    font-weight: 500;
}

.yeekit-cfb-radio-input {
    margin: 0 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    accent-color: #000;
    width: 18px !important;
    height: 18px !important;
}

.yeekit-cfb-radio-text {
    line-height: 1.4;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Select input styling - ONLY for CFB select field */
.yeekit-cfb-field-container select,
[class*="wp-block-checkout-fields-block"] select {
    min-height: 50px;
    height: 50px;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Checkbox Container, Fieldset, Options List & Single Checkbox */
.yeekit-cfb-field-container.wc-block-components-checkbox,
.yeekit-cfb-checkbox-container {
    min-height: auto;
}

.yeekit-cfb-checkbox-fieldset {
    border: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.yeekit-cfb-checkbox-legend {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
    padding: 0;
    display: block;
    width: 100%;
}

.yeekit-cfb-checkbox-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yeekit-cfb-checkbox-options-list.is-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.yeekit-cfb-checkbox-option-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer !important;
    pointer-events: auto !important;
    font-size: 14px;
    color: #2b2d2f;
    margin: 0;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
    border-radius: 4px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.yeekit-cfb-checkbox-option-item:hover {
    border-color: #000;
    background-color: #f8fafc;
}

.yeekit-cfb-checkbox-option-item.is-selected {
    border-color: #000;
    background-color: #f1f5f9;
    font-weight: 500;
}

.yeekit-cfb-checkbox-text {
    line-height: 1.4;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.yeekit-cfb-checkbox-single-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    user-select: none;
    -webkit-user-select: none;
}

/* Checkbox Button Native Box Reset & Styling - Crisp 18x18px square */
.yeekit-cfb-field-container input[type="checkbox"],
.yeekit-cfb-field-container .wc-block-components-checkbox__input {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    border: 1.5px solid #64748b !important;
    border-radius: 4px !important;
    background-color: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    position: relative !important;
    flex-shrink: 0 !important;
    flex: 0 0 18px !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
    transition: all 0.15s ease-in-out !important;
}

.yeekit-cfb-field-container input[type="checkbox"]:hover,
.yeekit-cfb-field-container .wc-block-components-checkbox__input:hover {
    border-color: #000 !important;
}

.yeekit-cfb-field-container input[type="checkbox"]:checked,
.yeekit-cfb-field-container .wc-block-components-checkbox__input:checked {
    background-color: #000 !important;
    border-color: #000 !important;
}

/* Crisp white checkmark inside checked box */
.yeekit-cfb-field-container input[type="checkbox"]:checked::after,
.yeekit-cfb-field-container .wc-block-components-checkbox__input:checked::after {
    content: "" !important;
    display: block !important;
    width: 4px !important;
    height: 9px !important;
    border: solid #ffffff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) translate(-0.5px, -1px) !important;
}

.yeekit-cfb-field-container input[type="checkbox"]:focus-visible,
.yeekit-cfb-field-container .wc-block-components-checkbox__input:focus-visible {
    outline: 2px solid #000 !important;
    outline-offset: 2px !important;
}

/* Help text matching WooCommerce caption style */
.yeekit-cfb-field-help-text {
    font-size: 0.8em;
    color: color-mix(in srgb, currentColor 65%, transparent);
    margin: 4px 0 0 0;
    line-height: 1.4;
}

/* Error states for fields */
.yeekit-cfb-field-container.has-error input:not([type="radio"]):not([type="checkbox"]),
.yeekit-cfb-field-container.has-error textarea,
.yeekit-cfb-field-container.has-error select {
    border-color: #cc1818 !important;
    box-shadow: 0 0 0 1px #cc1818 !important;
}

.yeekit-cfb-field-container.has-error .yeekit-cfb-radio-option-item {
    border-color: #cc1818 !important;
}

.yeekit-cfb-field-container.has-error .wc-block-components-checkbox__text {
    color: #cc1818 !important;
}

/* Error notice matching WooCommerce validation notice */
.yeekit-cfb-field-error {
    color: #cc1818;
    font-size: 0.82em;
    margin: 4px 0 0 0;
    font-weight: 500;
    display: block;
    line-height: 1.4;
    animation: yeekitCfbShake 0.3s ease-in-out;
}

@keyframes yeekitCfbShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* -------------------------------------------------------------------------
 * 1. Colour Swatches Field Styling
 * ------------------------------------------------------------------------- */

/* Ensure visual fields sit above WooCommerce overlay elements */
.yeekit-cfb-swatches-container,
.yeekit-cfb-picture-tiles-container,
.yeekit-cfb-slider-container,
.yeekit-cfb-colorpicker-container {
    z-index: 1 !important;
    position: relative !important;
}

.editor-styles-wrapper .yeekit-cfb-swatches-container,
.yeekit-cfb-swatches-container {
    overflow: visible !important;
}

.editor-styles-wrapper .yeekit-cfb-swatches-fieldset,
.yeekit-cfb-swatches-container .yeekit-cfb-swatches-fieldset {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.editor-styles-wrapper .yeekit-cfb-swatches-legend,
.yeekit-cfb-swatches-container .yeekit-cfb-swatches-legend,
.yeekit-cfb-swatches-legend {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 10px !important;
    display: block !important;
    line-height: 1.4 !important;
    pointer-events: auto !important;
    width: 100% !important;
}

.editor-styles-wrapper .yeekit-cfb-swatches-grid,
.yeekit-cfb-swatches-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;
}

.editor-styles-wrapper .yeekit-cfb-swatch-item,
.yeekit-cfb-swatch-item {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    transition: transform 0.15s ease !important;
    padding: 4px !important;
}

.yeekit-cfb-swatch-item input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.editor-styles-wrapper .yeekit-cfb-swatch-color,
.yeekit-cfb-swatch-color {
    display: block !important;
    box-sizing: border-box !important;
    border: 1.5px solid rgba(0, 0, 0, 0.15) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
}

/* Swatch Shapes */
.shape-circle .yeekit-cfb-swatch-color {
    border-radius: 50% !important;
}
.shape-rounded .yeekit-cfb-swatch-color {
    border-radius: 8px !important;
}
.shape-square .yeekit-cfb-swatch-color {
    border-radius: 2px !important;
}

/* Swatch Sizes */
.size-small .yeekit-cfb-swatch-color {
    width: 28px !important;
    height: 28px !important;
}
.size-medium .yeekit-cfb-swatch-color {
    width: 36px !important;
    height: 36px !important;
}
.size-large .yeekit-cfb-swatch-color {
    width: 46px !important;
    height: 46px !important;
}

.yeekit-cfb-swatch-item:hover .yeekit-cfb-swatch-color {
    transform: scale(1.08) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Selected state with vibrant halo ring */
.editor-styles-wrapper .yeekit-cfb-swatch-item.is-selected .yeekit-cfb-swatch-color,
.yeekit-cfb-swatch-item.is-selected .yeekit-cfb-swatch-color,
.yeekit-cfb-swatch-item:has(input[type="radio"]:checked) .yeekit-cfb-swatch-color {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4.5px currentColor, 0 4px 10px color-mix(in srgb, currentColor 35%, transparent) !important;
    transform: scale(1.12) !important;
}

.editor-styles-wrapper .yeekit-cfb-swatch-label,
.yeekit-cfb-swatch-label {
    font-size: 11px !important;
    color: #4b5563 !important;
    font-weight: 500 !important;
    max-width: 68px !important;
    text-align: center !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
}

.editor-styles-wrapper .yeekit-cfb-swatch-item.is-selected .yeekit-cfb-swatch-label,
.yeekit-cfb-swatch-item.is-selected .yeekit-cfb-swatch-label,
.yeekit-cfb-swatch-item:has(input[type="radio"]:checked) .yeekit-cfb-swatch-label {
    color: currentColor !important;
    font-weight: 700 !important;
}

/* -------------------------------------------------------------------------
 * 2. Colour Picker Field Styling
 * ------------------------------------------------------------------------- */
.editor-styles-wrapper .yeekit-cfb-colorpicker-container,
.yeekit-cfb-colorpicker-container {
    overflow: visible !important;
}

.editor-styles-wrapper .yeekit-cfb-colorpicker-wrapper,
.yeekit-cfb-colorpicker-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    position: relative !important;
}

.editor-styles-wrapper .yeekit-cfb-colorpicker-label,
.yeekit-cfb-colorpicker-container label,
.yeekit-cfb-colorpicker-label {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    pointer-events: auto !important;
    width: auto !important;
    max-width: none !important;
}

.editor-styles-wrapper .yeekit-cfb-colorpicker-control-row,
.yeekit-cfb-colorpicker-control-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    position: relative !important;
}

.editor-styles-wrapper .yeekit-cfb-colorpicker-swatch-preview,
.yeekit-cfb-colorpicker-swatch-preview {
    position: relative !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 8px !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    cursor: pointer !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.editor-styles-wrapper .yeekit-cfb-colorpicker-swatch-preview:hover,
.yeekit-cfb-colorpicker-swatch-preview:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 0 0 2px currentColor !important;
}

.editor-styles-wrapper input[type="color"].yeekit-cfb-color-input-native,
.yeekit-cfb-colorpicker-container input[type="color"],
input[type="color"].yeekit-cfb-color-input-native {
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 2 !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.editor-styles-wrapper input.yeekit-cfb-colorpicker-hex-input,
.yeekit-cfb-colorpicker-container input[type="text"],
input.yeekit-cfb-colorpicker-hex-input {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 140px !important;
    height: 44px !important;
    min-height: 44px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    padding: 0 12px !important;
    margin: 0 !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    box-sizing: border-box !important;
    line-height: 42px !important;
}

.editor-styles-wrapper input.yeekit-cfb-colorpicker-hex-input:focus,
input.yeekit-cfb-colorpicker-hex-input:focus {
    border-color: currentColor !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 20%, transparent) !important;
    outline: none !important;
}

/* -------------------------------------------------------------------------
 * 3. Picture Tiles Field Styling
 * ------------------------------------------------------------------------- */
.editor-styles-wrapper .yeekit-cfb-picture-tiles-container,
.yeekit-cfb-picture-tiles-container {
    overflow: visible !important;
}

.editor-styles-wrapper .yeekit-cfb-tiles-fieldset,
.yeekit-cfb-picture-tiles-container .yeekit-cfb-tiles-fieldset {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.editor-styles-wrapper .yeekit-cfb-tiles-legend,
.yeekit-cfb-picture-tiles-container .yeekit-cfb-tiles-legend,
.yeekit-cfb-tiles-legend {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 10px !important;
    display: block !important;
    line-height: 1.4 !important;
    pointer-events: auto !important;
    width: 100% !important;
}

.editor-styles-wrapper .yeekit-cfb-tiles-grid,
.yeekit-cfb-tiles-grid {
    display: grid !important;
    gap: 14px !important;
    width: 100% !important;
}

.yeekit-cfb-tiles-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}
.yeekit-cfb-tiles-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}
.yeekit-cfb-tiles-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

@media (max-width: 640px) {
    .yeekit-cfb-tiles-grid.cols-3,
    .yeekit-cfb-tiles-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.editor-styles-wrapper .yeekit-cfb-tile-card,
.yeekit-cfb-tile-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    overflow: hidden !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.yeekit-cfb-tile-card input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}

.editor-styles-wrapper .yeekit-cfb-tile-thumb-wrap,
.yeekit-cfb-tile-thumb-wrap {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 4 / 3 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #f3f4f6 !important;
}

.editor-styles-wrapper .yeekit-cfb-tile-thumb,
.yeekit-cfb-tile-thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.25s ease !important;
}

.yeekit-cfb-tile-card:hover .yeekit-cfb-tile-thumb {
    transform: scale(1.04) !important;
}

.editor-styles-wrapper .yeekit-cfb-tile-check-badge,
.yeekit-cfb-tile-check-badge {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background: currentColor !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    transform: scale(0.6) !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) !important;
}

.editor-styles-wrapper .yeekit-cfb-tile-card:hover,
.yeekit-cfb-tile-card:hover {
    border-color: #cbd5e1 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
}

.editor-styles-wrapper .yeekit-cfb-tile-card.is-selected,
.yeekit-cfb-tile-card.is-selected,
.yeekit-cfb-tile-card:has(input[type="radio"]:checked) {
    border-color: currentColor !important;
    background: color-mix(in srgb, currentColor 6%, #ffffff) !important;
    box-shadow: 0 0 0 1px currentColor, 0 6px 18px color-mix(in srgb, currentColor 20%, transparent) !important;
}

.editor-styles-wrapper .yeekit-cfb-tile-card.is-selected .yeekit-cfb-tile-check-badge,
.yeekit-cfb-tile-card.is-selected .yeekit-cfb-tile-check-badge,
.yeekit-cfb-tile-card:has(input[type="radio"]:checked) .yeekit-cfb-tile-check-badge {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.editor-styles-wrapper .yeekit-cfb-tile-meta,
.yeekit-cfb-tile-meta {
    padding: 8px 2px 2px 2px !important;
}

.editor-styles-wrapper .yeekit-cfb-tile-title,
.yeekit-cfb-tile-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.3 !important;
}

.editor-styles-wrapper .yeekit-cfb-tile-card.is-selected .yeekit-cfb-tile-title,
.yeekit-cfb-tile-card.is-selected .yeekit-cfb-tile-title,
.yeekit-cfb-tile-card:has(input[type="radio"]:checked) .yeekit-cfb-tile-title {
    color: currentColor !important;
    font-weight: 700 !important;
}

.editor-styles-wrapper .yeekit-cfb-tile-desc,
.yeekit-cfb-tile-desc {
    font-size: 11px !important;
    color: #6b7280 !important;
    margin-top: 3px !important;
    line-height: 1.3 !important;
}

/* -------------------------------------------------------------------------
 * 4. Slider Field Styling
 * ------------------------------------------------------------------------- */
.editor-styles-wrapper .yeekit-cfb-slider-container,
.yeekit-cfb-slider-container {
    overflow: visible !important;
}

.editor-styles-wrapper .yeekit-cfb-slider-wrapper,
.yeekit-cfb-slider-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    position: relative !important;
}

.editor-styles-wrapper .yeekit-cfb-slider-header,
.yeekit-cfb-slider-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
    width: 100% !important;
    position: static !important;
}

.editor-styles-wrapper .yeekit-cfb-slider-label,
.yeekit-cfb-slider-container label,
.yeekit-cfb-slider-label {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: inline-block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    pointer-events: auto !important;
    width: auto !important;
    max-width: none !important;
}

.editor-styles-wrapper .yeekit-cfb-slider-badge,
.yeekit-cfb-slider-badge {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: currentColor !important;
    background: color-mix(in srgb, currentColor 8%, transparent) !important;
    border: 1px solid color-mix(in srgb, currentColor 20%, transparent) !important;
    border-radius: 12px !important;
    padding: 2px 10px !important;
    min-width: 44px !important;
    height: 24px !important;
    line-height: 20px !important;
    text-align: center !important;
    box-shadow: 0 1px 2px color-mix(in srgb, currentColor 10%, transparent) !important;
    box-sizing: border-box !important;
}

.editor-styles-wrapper .yeekit-cfb-slider-input-row,
.yeekit-cfb-slider-input-row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    position: relative !important;
}

.editor-styles-wrapper .yeekit-cfb-slider-bound,
.yeekit-cfb-slider-bound {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

.editor-styles-wrapper input[type="range"].yeekit-cfb-range-input,
.yeekit-cfb-slider-container input[type="range"],
input[type="range"].yeekit-cfb-range-input {
    flex: 1 1 auto !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    height: 6px !important;
    min-height: 6px !important;
    max-height: 6px !important;
    background: #e5e7eb;
    color: inherit !important;
    border-radius: 3px !important;
    outline: none !important;
    margin: 10px 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: none !important;
    border: none !important;
    box-shadow: none !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.editor-styles-wrapper input[type="range"].yeekit-cfb-range-input::-webkit-slider-runnable-track,
.yeekit-cfb-slider-container input[type="range"]::-webkit-slider-runnable-track,
input[type="range"].yeekit-cfb-range-input::-webkit-slider-runnable-track {
    height: 6px !important;
    background: transparent !important;
    border-radius: 3px !important;
    border: none !important;
}

.editor-styles-wrapper input[type="range"].yeekit-cfb-range-input::-webkit-slider-thumb,
.yeekit-cfb-slider-container input[type="range"]::-webkit-slider-thumb,
input[type="range"].yeekit-cfb-range-input::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    margin-top: -6px !important;
    border-radius: 50% !important;
    background: currentColor !important;
    cursor: pointer !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.editor-styles-wrapper input[type="range"].yeekit-cfb-range-input::-moz-range-track,
.yeekit-cfb-slider-container input[type="range"]::-moz-range-track,
input[type="range"].yeekit-cfb-range-input::-moz-range-track {
    height: 6px !important;
    background: #e5e7eb !important;
    border-radius: 3px !important;
    border: none !important;
}

.editor-styles-wrapper input[type="range"].yeekit-cfb-range-input::-moz-range-thumb,
.yeekit-cfb-slider-container input[type="range"]::-moz-range-thumb,
input[type="range"].yeekit-cfb-range-input::-moz-range-thumb {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: currentColor !important;
    cursor: pointer !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.yeekit-cfb-range-input:hover::-webkit-slider-thumb,
.yeekit-cfb-range-input:active::-webkit-slider-thumb {
    transform: scale(1.15) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 25%, transparent) !important;
}

.yeekit-cfb-range-input:hover::-moz-range-thumb,
.yeekit-cfb-range-input:active::-moz-range-thumb {
    transform: scale(1.15) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 25%, transparent) !important;
}

/* -------------------------------------------------------------------------
 * 5. File Upload Field (Pro) Styling
 * ------------------------------------------------------------------------- */
/* Ensure File Upload Container and its Block Wrapper ALWAYS occupy 100% full width */
[class*="wp-block-checkout-fields-block"]:has(.yeekit-cfb-upload-container),
[class*="wp-block-checkout-fields-block-file-upload-field"],
.editor-styles-wrapper .yeekit-cfb-upload-container,
.yeekit-cfb-upload-container,
.yeekit-cfb-upload-container.yeekit-cfb-width-100 {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    display: block !important;
    clear: both !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: visible !important;
}

.editor-styles-wrapper .yeekit-cfb-upload-header,
.yeekit-cfb-upload-header {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 6px !important;
    width: 100% !important;
}

.editor-styles-wrapper .yeekit-cfb-upload-label,
.yeekit-cfb-upload-header label,
.yeekit-cfb-upload-label {
    position: static !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    pointer-events: auto !important;
    width: auto !important;
    max-width: none !important;
}

.yeekit-cfb-pro-tag {
    margin-left: 8px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    background: currentColor !important;
    color: #ffffff !important;
    letter-spacing: 0.5px !important;
}

.editor-styles-wrapper .yeekit-cfb-dropzone,
.yeekit-cfb-dropzone {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border: 2px dashed #cbd5e1 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    padding: 24px 16px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.yeekit-cfb-dropzone-overlay {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    cursor: pointer !important;
    z-index: 5 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
}

.yeekit-cfb-dropzone-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
}


.editor-styles-wrapper .yeekit-cfb-dropzone:hover,
.yeekit-cfb-dropzone:hover {
    border-color: currentColor !important;
    background: color-mix(in srgb, currentColor 4%, #ffffff) !important;
}

.yeekit-cfb-dropzone.is-dragover {
    border-color: currentColor !important;
    background: color-mix(in srgb, currentColor 8%, #ffffff) !important;
    transform: scale(1.005) !important;
}

.editor-styles-wrapper .yeekit-cfb-dropzone-icon,
.yeekit-cfb-dropzone-icon {
    color: currentColor !important;
    margin-bottom: 8px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.editor-styles-wrapper .yeekit-cfb-dropzone-cta,
.yeekit-cfb-dropzone-cta {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 4px !important;
}

.editor-styles-wrapper .yeekit-cfb-dropzone-hint,
.yeekit-cfb-dropzone-hint {
    display: block !important;
    font-size: 11.5px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}

.yeekit-cfb-upload-container .yeekit-cfb-file-input-native,
.yeekit-cfb-file-input-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

/* Upload Progress Bar */
.yeekit-cfb-upload-progress-wrap {
    display: none;
    margin-top: 12px !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.yeekit-cfb-upload-progress-wrap.is-visible {
    display: block !important;
}

.yeekit-cfb-upload-progress-track {
    background: #e2e8f0 !important;
    border-radius: 999px !important;
    height: 6px !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
}

.yeekit-cfb-upload-progress-bar {
    height: 100% !important;
    background: currentColor !important;
    border-radius: 999px !important;
    transition: width 0.25s ease !important;
}

.yeekit-cfb-upload-progress-text {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin-top: 6px !important;
    display: block !important;
    text-align: center !important;
}

/* Uploaded Files List (Multiple files support) */
.yeekit-cfb-upload-files-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Uploaded Preview Card */
.editor-styles-wrapper .yeekit-cfb-upload-preview,
.yeekit-cfb-upload-preview {
    display: none;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    animation: yeekitCfbFadeIn 0.2s ease !important;
}

.yeekit-cfb-upload-files-list .yeekit-cfb-upload-preview,
.editor-styles-wrapper .yeekit-cfb-upload-preview.is-visible,
.yeekit-cfb-upload-preview.is-visible {
    display: flex !important;
}

@keyframes yeekitCfbFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.yeekit-cfb-upload-preview-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    overflow: hidden !important;
}

.yeekit-cfb-preview-thumb {
    width: 40px !important;
    height: 40px !important;
    border-radius: 6px !important;
    background: color-mix(in srgb, currentColor 8%, #f1f5f9) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    border: 1px solid #cbd5e1 !important;
}

.yeekit-cfb-preview-file-icon {
    color: currentColor !important;
}

.yeekit-cfb-preview-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.yeekit-cfb-preview-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    overflow: hidden !important;
}

.yeekit-cfb-preview-name {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: min(360px, 60vw) !important;
}

.yeekit-cfb-preview-size {
    font-size: 11px !important;
    color: #64748b !important;
}

.yeekit-cfb-upload-remove-btn {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 6px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
}

.yeekit-cfb-upload-remove-btn:hover {
    color: #ef4444 !important;
    background: #fee2e2 !important;
}

/* ==========================================================================
   15. DIGITAL SIGNATURE FIELD (PRO)
   ========================================================================== */
[class*="wp-block-checkout-fields-block"]:has(.yeekit-cfb-signature-container),
.editor-styles-wrapper .yeekit-cfb-signature-container,
.yeekit-cfb-signature-container,
.yeekit-cfb-signature-container.yeekit-cfb-width-100 {
    width: 100% !important;
    min-width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    display: block !important;
    clear: both !important;
    box-sizing: border-box !important;
    margin-bottom: 1.5em;
}

.yeekit-cfb-signature-container.yeekit-cfb-width-50 {
    width: calc(50% - 8px) !important;
    min-width: 260px !important;
    flex: 0 0 calc(50% - 8px) !important;
}

.yeekit-cfb-signature-container.yeekit-cfb-width-33 {
    width: calc(33.333% - 10px) !important;
    min-width: 200px !important;
    flex: 0 0 calc(33.333% - 10px) !important;
}

.editor-styles-wrapper .yeekit-cfb-signature-header,
.yeekit-cfb-signature-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 6px !important;
}

.editor-styles-wrapper .yeekit-cfb-signature-label,
.yeekit-cfb-signature-header label,
.yeekit-cfb-signature-label {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.yeekit-cfb-signature-pad-wrap {
    position: relative !important;
    width: 100% !important;
    min-width: 100% !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    cursor: crosshair !important;
    touch-action: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.yeekit-cfb-signature-pad-wrap:hover {
    border-color: #94a3b8 !important;
}

.yeekit-cfb-signature-pad-wrap:focus-within,
.yeekit-cfb-signature-container.is-active .yeekit-cfb-signature-pad-wrap {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), inset 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.yeekit-cfb-signature-container.has-error .yeekit-cfb-signature-pad-wrap {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.yeekit-cfb-signature-canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2 !important;
    display: block !important;
    touch-action: none !important;
}

.yeekit-cfb-signature-baseline {
    position: absolute !important;
    bottom: 26px !important;
    left: 20px !important;
    right: 20px !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    padding-bottom: 4px !important;
    z-index: 1 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
    user-select: none !important;
}

.yeekit-cfb-signature-container.is-signed .yeekit-cfb-signature-baseline {
    opacity: 0.25 !important;
}

.yeekit-cfb-signature-baseline-x {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    margin-right: 8px !important;
    line-height: 1 !important;
}

.yeekit-cfb-signature-baseline-text {
    font-size: 11px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #94a3b8 !important;
    line-height: 1 !important;
}

.yeekit-cfb-signature-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 8px !important;
    gap: 8px !important;
}

.yeekit-cfb-signature-clear-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    outline: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.yeekit-cfb-signature-clear-btn:hover {
    background: #f8fafc !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}

.yeekit-cfb-signature-clear-btn:active {
    transform: scale(0.98) !important;
    background: #f1f5f9 !important;
}

.yeekit-cfb-signature-clear-btn svg {
    color: #64748b !important;
    transition: transform 0.2s ease !important;
}

.yeekit-cfb-signature-clear-btn:hover svg {
    color: #1e293b !important;
    transform: rotate(-45deg) !important;
}

.yeekit-cfb-signature-status {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #10b981 !important;
}

.yeekit-cfb-signature-status-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: #d1fae5 !important;
    color: #059669 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
}

.yeekit-cfb-signature-loader {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.85) !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
}

.yeekit-cfb-signature-spinner {
    width: 14px !important;
    height: 14px !important;
    border: 2px solid #e2e8f0 !important;
    border-top-color: #2563eb !important;
    border-radius: 50% !important;
    animation: yeekit-cfb-sig-spin 0.6s linear infinite !important;
}

@keyframes yeekit-cfb-sig-spin {
    to { transform: rotate(360deg); }
}

/* Conditionally hidden fields - Highest priority */
.yeekit-cfb-field-container.yeekit-cfb-hidden,
.yeekit-cfb-field-container[data-conditional-hidden="true"],
.yeekit-cfb-field-container[style*="display: none"],
[class*="wp-block-checkout-fields-block"].yeekit-cfb-hidden,
[class*="wp-block-checkout-fields-block"][data-conditional-hidden="true"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Option Extra Price Styling */
.yeekit-cfb-option-price {
    display: inline-block;
    font-weight: 600;
    color: #16a34a;
    margin-left: 6px;
    font-size: 0.9em;
    vertical-align: baseline;
}
.yeekit-cfb-tile-meta .yeekit-cfb-option-price {
    font-size: 0.85em;
    margin-left: 4px;
}