/* Editor-specific styles for the Testimonial Block */

.rlc-testimonial {
    /* Ensure the block has proper spacing in the editor */
    padding: var(--space-l) var(--space-m);
}

/* Hide overflow on the main container in editor */
.editor-styles-wrapper .rlc-testimonial {
    overflow: hidden;
}

/* Ensure buttons are more visible in the editor */
.rlc-testimonial__arrow {
    opacity: 0.9 !important;
    border: 1px solid var(--neutral-light) !important;
}

/* Improve placeholder display in the editor */
.rlc-testimonial__placeholder {
    min-height: 200px;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--neutral-ultra-light);
    border: 2px dashed var(--neutral-light);
    border-radius: var(--radius);
    margin: var(--space-m) 0;
}

.rlc-testimonial__placeholder p {
    margin-top: var(--space-s);
    color: var(--neutral-dark);
    font-size: var(--text-m);
}

/* Make block handles more visible */
.rlc-testimonial:hover {
    /* No outline on hover */
}

/* Better visibility for item borders in editor */
.rlc-testimonial__item {
    border: 1px solid var(--neutral-light);
    transition: border-color 0.2s ease;
    margin: var(--space-xs);
}

.rlc-testimonial__item:hover {
    border-color: var(--action-light);
}

/* Override some slider behavior for better editing experience */
.editor-styles-wrapper .rlc-testimonial[data-display-mode="grid"] .rlc-testimonial__slider .rlc-testimonial__slide {
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
}

.editor-styles-wrapper .rlc-testimonial[data-display-mode="grid"] .rlc-testimonial__slider .rlc-testimonial__track {
    transform: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: var(--space-m);
}

/* For slider mode in editor, show slides in a row */
.editor-styles-wrapper .rlc-testimonial[data-display-mode="slider"] .rlc-testimonial__slider {
    overflow: visible !important;
    max-width: 100%;
}

.editor-styles-wrapper .rlc-testimonial[data-display-mode="slider"] .rlc-testimonial__track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--space-m);
    transform: none !important;
    width: 100% !important;
}

/* Show correct number of slides based on slidesToShow setting */
.editor-styles-wrapper .rlc-testimonial[data-display-mode="slider"][data-slides-to-show="1"] .rlc-testimonial__slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: auto !important;
    max-width: 800px !important;
}

.editor-styles-wrapper .rlc-testimonial[data-display-mode="slider"][data-slides-to-show="2"] .rlc-testimonial__slide {
    flex: 0 0 calc(50% - var(--space-m) / 2) !important;
    width: calc(50% - var(--space-m) / 2) !important;
    min-width: auto !important;
}

.editor-styles-wrapper .rlc-testimonial[data-display-mode="slider"][data-slides-to-show="3"] .rlc-testimonial__slide {
    flex: 0 0 calc(33.333% - var(--space-m) * 2 / 3) !important;
    width: calc(33.333% - var(--space-m) * 2 / 3) !important;
    min-width: auto !important;
}

/* Make sure the editor view doesn't get too tall */
.editor-styles-wrapper .rlc-testimonial__container {
    max-height: none;
    overflow: visible;
    margin-bottom: var(--space-m);
}

/* Improve font rendering in the editor */
.editor-styles-wrapper .rlc-testimonial__quote {
    color: var(--primary);
}

/* Ensure images have proper dimensions in the editor */
.editor-styles-wrapper .rlc-testimonial__avatar img,
.editor-styles-wrapper .rlc-testimonial__logo img {
    max-width: 100%;
    height: auto;
}

/* Hide navigation elements in editor only if they're disabled */
.editor-styles-wrapper .rlc-testimonial[data-show-arrows="false"] .rlc-testimonial__arrow {
    display: none !important;
}

.editor-styles-wrapper .rlc-testimonial[data-show-dots="false"] .rlc-testimonial__dots {
    display: none !important;
}

/* Style navigation elements in editor to be visible but not interactive */
.editor-styles-wrapper .rlc-testimonial__arrow {
    opacity: 0.5;
    pointer-events: none;
}

.editor-styles-wrapper .rlc-testimonial__dots {
    opacity: 0.5;
    pointer-events: none;
}