/* Elementor Compatibility Styles */

.elementor-control-hpb-dynamic-grid-selector,
.elementor-control-hpb-dynamic-carousel-selector,
.elementor-control-hpb-dynamic-slider-selector {
    width: 100%;
}

.elementor-control-input-wrapper .hpb-dynamic-grid-selector,
.elementor-control-input-wrapper .hpb-dynamic-carousel-selector,
.elementor-control-input-wrapper .hpb-dynamic-slider-selector {
    width: 100%;
    flex: 1;
}

/* Refresh Button Styles */
.hpb-refresh-grids,
.hpb-refresh-carousels,
.hpb-refresh-sliders {
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    background: #fff !important;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.hpb-refresh-grids:hover,
.hpb-refresh-carousels:hover,
.hpb-refresh-sliders:hover {
    border-color: #999 !important;
    background: #f5f5f5 !important;
}

.hpb-refresh-grids:disabled,
.hpb-refresh-carousels:disabled,
.hpb-refresh-sliders:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hpb-refresh-grids:active,
.hpb-refresh-carousels:active,
.hpb-refresh-sliders:active {
    background: #e8f5e9 !important;
}

/* Control wrapper alignment */
.elementor-control-input-wrapper {
    display: flex !important;
    gap: 8px;
    align-items: stretch;
}

.elementor-control-input-wrapper > div:first-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.elementor-control-input-wrapper select {
    padding: 8px 12px;
}

/* Loading state */
.elementor-control-input-wrapper select:disabled {
    opacity: 0.6;
}

/* Elementor Grid Preview - Better visibility */
.hpb-grid {
    width: 100%;
    min-height: auto !important;
    opacity: 1 !important;
    transform: none !important;
}

.hpb-grid--bento-slider {
    min-height: 300px;
}

.hpb-carousel,
.hpb-slider {
    width: 100%;
    opacity: 1 !important;
    transform: none !important;
}

/* Items visibility in editor */
.elementor-editor-active .hpb-grid__item,
.elementor-editor-active .hpb-carousel__item,
.elementor-editor-active .hpb-slider__item {
    opacity: 1 !important;
}

/* RTL Support */
[dir="rtl"] .elementor-control-input-wrapper {
    flex-direction: row-reverse;
}

[dir="rtl"] .hpb-refresh-grids,
[dir="rtl"] .hpb-refresh-carousels,
[dir="rtl"] .hpb-refresh-sliders {
    margin-right: 8px;
    margin-left: 0;
}
