/**
 * Carousel Editor CSS
 * Styles für den vollständigen Modal-Editor
 */

/* ============================================
   PLUGIN SELECTOR
   ============================================ */

.plugin-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 10px;
}

.plugin-selector-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.plugin-selector-card:not(.disabled):hover {
    border-color: #204d9c;
    box-shadow: 0 4px 12px rgba(240, 140, 80, 0.2);
    transform: translateY(-3px);
}

.plugin-selector-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

.plugin-selector-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    line-height: 1;
}

.plugin-selector-card h6 {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #333;
}

.plugin-selector-card p {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    line-height: 1.3;
}

/* ============================================
   CAROUSEL EDITOR MODAL
   ============================================ */

.carousel-editor-modal .modal-dialog {
    max-width: 1200px;
}

.carousel-editor-modal .modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.carousel-editor-modal .modal-header {
    background: linear-gradient(135deg, #204d9c 0%, #16366d 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.carousel-editor-modal .modal-header .modal-title {
    font-weight: 600;
}

.carousel-editor-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.carousel-editor-modal .modal-header .btn-close:hover {
    opacity: 1;
}

.carousel-editor-modal .modal-body {
    padding: 0;
    max-height: 80vh;
    overflow: hidden;
}

/* ============================================
   EDITOR LAYOUT
   ============================================ */

.carousel-full-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.carousel-editor-header {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #204d9c;
    background: linear-gradient(135deg, #f0f4fa 0%, #ffffff 100%);
    flex-shrink: 0;
}

.carousel-editor-header h4 {
    color: #204d9c;
    margin: 0;
}

.carousel-editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8f9fa;
}

.carousel-editor-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    background: #fff;
    flex-shrink: 0;
}

/* ============================================
   EDITOR SECTIONS
   ============================================ */

.editor-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.editor-section-title {
    color: #204d9c;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editor-section-title i {
    opacity: 0.8;
}

.editor-subsection {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px dashed #e8e8e8;
}

.editor-subsection:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.editor-subsection h6 {
    font-size: 0.85rem;
    color: #555;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-control-color {
    width: 42px;
    height: 32px;
    padding: 2px;
    border-radius: 4px 0 0 4px;
}

.input-group-sm .form-control-color {
    height: 31px;
}

.opacity-value {
    min-width: 45px;
    text-align: right;
    font-weight: 500;
    color: #666;
}

/* ============================================
   SLIDES CONTAINER
   ============================================ */

.slides-container {
    max-height: 450px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    background: #fafafa;
}

.slides-container::-webkit-scrollbar {
    width: 6px;
}

.slides-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.slides-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.slides-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.slides-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #999;
}

.slides-empty-state i {
    opacity: 0.4;
}

/* ============================================
   SLIDE ITEM
   ============================================ */

.slide-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.slide-item:hover {
    border-color: #204d9c;
    box-shadow: 0 2px 8px rgba(240, 140, 80, 0.15);
}

.slide-item:last-child {
    margin-bottom: 0;
}

.slide-header {
    background: linear-gradient(135deg, #204d9c 0%, rgba(240, 140, 80, 0.75) 100%);
    color: white;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    user-select: none;
}

.slide-header:hover {
    background: linear-gradient(135deg, rgba(240, 140, 80, 0.85) 0%, #204d9c 100%);
}

.slide-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    flex: 1;
    min-width: 0;
}

.slide-number {
    white-space: nowrap;
}

.slide-title-preview {
    opacity: 0.9;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.slide-title-preview:not(:empty)::before {
    content: "– ";
}

.slide-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.slide-header-actions .btn {
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.slide-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.slide-item.expanded .slide-content {
    padding: 1rem;
    max-height: 500px;
}

/* ============================================
   SLIDE IMAGE
   ============================================ */

.slide-image-wrapper {
    text-align: center;
}

.slide-image-preview {
    width: 100%;
    height: 100px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    color: #999;
    gap: 0.25rem;
}

.slide-image-preview i {
    font-size: 1.5rem;
}

.slide-image-preview span {
    font-size: 0.75rem;
}

.slide-image-preview:hover {
    border-color: #204d9c;
    background-color: rgba(240, 140, 80, 0.05);
    color: #204d9c;
}

.slide-image-preview.has-image {
    border-style: solid;
    border-color: #204d9c;
}

.slide-image-preview.has-image i,
.slide-image-preview.has-image span {
    display: none;
}

.slide-image-preview.has-image:hover {
    opacity: 0.85;
}

/* ============================================
   PREVIEW CONTAINER
   ============================================ */

.preview-container {
    background: linear-gradient(135deg, #f5f5f5 0%, #ececec 100%);
    border-radius: 10px;
    padding: 1.5rem;
    min-height: 280px;
    overflow: hidden;
    position: relative;
}

.preview-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #aaa;
}

.preview-empty-state i {
    opacity: 0.5;
}

/* Preview Carousel Styles */
.preview-carousel-section {
    width: 100%;
    position: relative;
}

.preview-carousel-section .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

.preview-carousel-card {
    position: relative;
    width: 100%;
}

/* ============================================
   DRAG HANDLE
   ============================================ */

.drag-handle {
    cursor: grab;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.drag-handle:hover {
    opacity: 1;
}

.slide-item.dragging {
    opacity: 0.5;
}

.slide-item.drag-over {
    border-color: #204d9c;
    border-style: dashed;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .carousel-editor-modal .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .carousel-editor-body {
        padding: 1rem;
    }
    
    .slides-container {
        max-height: 300px;
    }
    
    .slide-title-preview {
        max-width: 120px;
    }
}

@media (max-width: 767px) {
    .carousel-editor-header h4 {
        font-size: 1.1rem;
    }
    
    .editor-section {
        padding: 1rem;
    }
    
    .slide-image-preview {
        height: 80px;
    }
    
    .preview-container {
        min-height: 220px;
        padding: 1rem;
    }
}

/* ============================================
   ARTICLE CONTAINER OPTIONS (Screenshot)
   ============================================ */

.plugin-container-options {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.plugin-container-options h6 {
    color: #204d9c;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.plugin-indicator {
    background: linear-gradient(135deg, #204d9c 0%, #16366d 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.plugin-indicator-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.plugin-indicator-icon {
    font-size: 1.5rem;
}

.plugin-indicator-text {
    font-weight: 500;
}

.plugin-indicator-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.slide-item {
    animation: slideIn 0.3s ease forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-indicator {
    animation: pulse 1.5s ease-in-out infinite;
}
