/* Styles für Frontend-Content-Komponenten */

/* Allgemeine Content-Element Styles */
.content-element {
    margin-bottom: 1.5rem;
}

/* Debug-Info Styles */
.content-debug-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.content-debug-info.child-element {
    margin-left: 1rem;
    border-left: 3px solid #6c757d;
}

.debug-header {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.debug-header-info {
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.debug-toggle-icon {
    display: inline-block;
    width: 16px;
    text-align: center;
}

.debug-type {
    font-weight: bold;
    color: #005CA0;
}

.debug-id {
    color: #6c757d;
}

.debug-name {
    color: #333;
    font-style: italic;
}

.debug-summary {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

.debug-pill {
    background-color: #e9ecef;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
}

.debug-details {
    border-top: 1px solid #dee2e6;
    padding: 0.5rem;
    background-color: #fff;
}

.debug-row {
    margin-bottom: 0.25rem;
    display: flex;
}

.debug-label {
    font-weight: bold;
    min-width: 120px;
}

/* Text Content Styles */
.text-content {
    line-height: 1.6;
}

.text-content p:last-child {
    margin-bottom: 0;
}

/* Image Content Styles */
.image-content {
    text-align: center;
}

.image-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
}

.image-caption {
    margin-top: 0.5rem;
    font-style: italic;
    color: #6c757d;
    text-align: center;
}

/* Gallery Content Styles */
.gallery-content {
    margin-bottom: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 0.25rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-placeholder {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 2rem;
    text-align: center;
    color: #6c757d;
}

/* Image with Text Content Styles */
.image-with-text-content {
    margin-bottom: 1.5rem;
}

.image-text-container {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.image-text-container.image-top,
.image-text-container.image-bottom {
    flex-direction: column;
}

.image-text-container.image-left {
    flex-direction: row;
}

.image-text-container.image-right {
    flex-direction: row-reverse;
}

.image-part {
    flex: 0 0 auto;
}

.image-part img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    cursor: pointer;
}

.text-part {
    flex: 1 1 auto;
}

.text-part p:last-child {
    margin-bottom: 0;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .image-text-container.image-left,
    .image-text-container.image-right {
        flex-direction: column;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Plugin Content Styles */
.plugin-content {
    /*
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1.5rem;
    */
}

/* Einklappbare Inhalte Styles */
.content-collapsible .collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 0;
}

.content-collapsible .collapsible-header:hover {
    background-color: #e9ecef;
}

.content-collapsible .collapse-toggle-icon {
    font-size: 18px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    background-color: #e9ecef;
    border-radius: 50%;
    color: #495057;
}

/* Alle Überschriften im Header haben keinen Margin-Bottom */
.content-collapsible .collapsible-header h1,
.content-collapsible .collapsible-header h2,
.content-collapsible .collapsible-header h3,
.content-collapsible .collapsible-header h4,
.content-collapsible .collapsible-header h5,
.content-collapsible .collapsible-header h6 {
    margin-bottom: 0;
}

.content-collapsible .collapsible-content {
    padding: 15px;
    border: 1px solid #dee2e6;
    border-top: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, border-width 0.3s ease;
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
}

.content-collapsible .collapsible-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    opacity: 0;
    visibility: hidden;
}