.carousel-builder-shell .card {
    border-radius: 1rem;
}

.preview-frame {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

.preview-frame .carousel,
.preview-frame .carousel-item {
    border-radius: 0;
    overflow: hidden;
}

#preview-container:fullscreen {
    padding: 0;
    background: #111;
}

#preview-container:fullscreen.fullscreen-cursor-hidden {
    cursor: none;
}

#preview-container:fullscreen .carousel,
#preview-container:fullscreen .carousel-inner,
#preview-container:fullscreen .carousel-item {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
}

#preview-container:fullscreen .carousel-image-only {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

#preview-container:fullscreen .carousel-text-slide {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
}

#preview-container:fullscreen .carousel-mixed-slide {
    width: 100vw;
    height: 100vh;
}

.carousel-text-slide {
    min-height: 300px;
    padding: 2.75rem 2rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #0d6efd 0%, #20c997 100%);
}

.carousel-image-only {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.carousel-mixed-slide {
    position: relative;
    min-height: 300px;
}

.carousel-mixed-overlay {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}

.mode-custom-group {
    max-width: 260px;
}

.mode-switch-group {
    display: flex;
    gap: 0.5rem;
}

.mode-switch-group .mode-switch-btn {
    flex: 1;
}

.mode-switch-group .mode-switch-btn.is-active {
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.2);
}

.slide-editor-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 22%, var(--bs-border-color));
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: color-mix(in srgb, var(--bs-body-bg) 90%, var(--bs-primary) 10%);
    cursor: grab;
}

.slide-editor-row.is-dragging {
    opacity: 0.55;
}

.slide-editor-row.is-drag-over {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.2);
}

.slide-editor-thumb {
    width: 140px;
    flex: 0 0 140px;
}

.slide-editor-thumb-image {
    width: 100%;
    height: 88px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-secondary-bg);
}

.slide-editor-content {
    flex: 1;
}

.slide-inline-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.slide-color-inline {
    flex: 0 0 2.75rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
}

.slide-color-inline .form-control-color {
    margin-top: 0;
}

.slide-color-input {
    width: 100%;
    min-width: 2.75rem;
    height: 100%;
    min-height: 38px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--bs-border-color);
}

.slide-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.slide-color-input::-webkit-color-swatch {
    border: 0;
    border-radius: 0.35rem;
}

.slide-color-input::-moz-color-swatch {
    border: 0;
    border-radius: 0.35rem;
}

.slide-inline-row .form-control {
    flex: 1;
}

.slide-body-textarea {
    resize: none;
    overflow: hidden;
    min-height: 38px;
}

.slide-editor-remove {
    display: flex;
    align-items: flex-start;
}

.slide-remove-btn {
    min-width: 2.1rem;
}

[data-bs-theme="dark"] .preview-frame {
    background: linear-gradient(145deg, rgba(var(--bs-primary-rgb), 0.2) 0%, rgba(var(--bs-info-rgb), 0.12) 40%, var(--bs-body-bg) 100%);
}

[data-bs-theme="dark"] .slide-editor-row {
    background: color-mix(in srgb, var(--bs-body-bg) 86%, var(--bs-primary) 14%);
}

[data-bs-theme="dark"] .carousel-mixed-overlay {
    background: rgba(0, 0, 0, 0.58);
}

@media (max-width: 991.98px) {
    .carousel-text-slide,
    .carousel-image-only,
    .carousel-mixed-slide {
        min-height: 230px;
        height: 230px;
    }

    .slide-editor-row {
        flex-direction: column;
    }

    .slide-editor-thumb {
        width: 100%;
        flex-basis: auto;
    }

    .slide-editor-thumb-image {
        height: 140px;
    }

    .slide-editor-remove {
        justify-content: flex-end;
    }

    .slide-inline-row {
        flex-wrap: nowrap;
    }
}
