.row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 80%;
    justify-content: center;
    align-items: center;
}

/* Special handling for rows with ImageSlider */
.row:has(.imageslider-module) {
    gap: 0;
    justify-content: flex-start;
}

.row.text-left {
    margin-left: 0 !important;
    margin-right: auto !important;
}

.row.text-center {
    margin-left: auto !important;
    margin-right: auto !important;
}

.row.text-right {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.text-module {
    flex: 1;
    padding: 1rem;
    background: #fff;
    border-radius: 4px;
}

.text-module.text-small {
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-module.text-medium {
    font-size: 1rem;
    line-height: 1.6;
}

.text-module.text-large {
    font-size: 1.25rem;
    line-height: 1.7;
}

.ql-align-center {
    text-align: center;
}

.ql-align-right {
    text-align: right;
}

.ql-align-justify {
    text-align: justify;
}

.ql-size-large {
    font-size: 2rem;
}

.ql-size-huge {
    font-size: 3rem;
}

.text-module.text-right {
    text-align: right;
}

.text-module.text-justify {
    text-align: justify;
}

/* Style for the image container */
.image-module {
    display: block;
    /* Additional styling as needed */
}

.image-module img {
    width: 100%;
    /* Make sure the image scales to the container */
    height: auto;
    /* Maintain aspect ratio */
    object-fit: contain;
    /* Optional: This will ensure the image fits within the container */
}

/* Panorama Tour Styles */
.panoramatour-module {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    min-height: 600px;
}

.panoramatour-module[style*="height: auto"] {
    align-self: stretch;
}

.panoramatour-module>div {
    position: relative !important;
    width: inherit !important;
    height: inherit !important;
    border-radius: 8px;
    overflow: hidden;
}

/* Leaflet Map Styles */
.leafletmap-module {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    min-height: 600px;
}

.leafletmap-module>div {
    position: relative !important;
    width: inherit !important;
    height: inherit !important;
    border-radius: 8px;
    overflow: hidden;
}

/* Zusätzliche Styles für die Leaflet-Karte selbst */
.leaflet-container {
    height: 100% !important;
    min-height: 600px !important;
    border-radius: 8px;
}

.large {
    font-size: 1.5rem;
}

.medium {
    font-size: 1rem;
}

.left {
    text-align: left;
}

.right {
    text-align: right;
}

/* Audio Module Styles */
.audio-module {
    position: relative;
    overflow: hidden;

    justify-content: center;


    min-height: 200px;
}

.audio-module>div {
    position: relative !important;
    width: inherit !important;
    height: inherit !important;
    border-radius: 8px;
    overflow: hidden;
}

.audio-container {
    width: 90%;
    height: 100%;
}

.audio-player-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.audio-cover {
    border-radius: 10%;
    object-fit: cover;
}

.audio-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.audio-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #333;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-play-button {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    color: #007bff;
}

.audio-progress {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 2px;
    outline: none;
}

.audio-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

.audio-time {
    font-size: 0.9em;
    min-width: 80px;
    color: #666;
}

.audio-volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.audio-volume-slider {
    width: 100px;
    height: 4px;
}

.audio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

.audio-description {
    margin: 10px 0 0 0;
    font-size: 0.9em;
    color: #666;
}

/* Image Slider Module Styles - responsive: allow inline width / auto height */
.imageslider-module {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    /* allow module inline width (z. B. style="width:50%") to take effect */
    max-width: 100%;
    width: auto;
}

.imageslider-module>div {
    position: relative !important;
    width: 100%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
}

.imageslider-container {
    width: 100%;
    height: auto;
    display: block;
}

/* Ensure the custom element and possible internal wrappers are fluid */
.imageslider-container img-comparison-slider,
.imageslider-container img-comparison-slider .before,
.imageslider-container img-comparison-slider .after,
.imageslider-container img-comparison-slider .viewport {
    width: 100% !important;
    height: auto !important;
    display: block;
    max-width: 100%;
}

.imageslider-container img-comparison-slider img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    max-width: 100%;
}

.threedviewer-module {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.threedviewer-module[style*="height: auto"] {
    align-self: stretch;
}

.threedviewer-module canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Text sizes */
.text-module.small {
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-module.medium {
    font-size: 1rem;
    line-height: 1.6;
}

.text-module.large {
    font-size: 1.25rem;
    line-height: 1.7;
}

/* Text alignments */
.text-module.left {
    text-align: left;
}

.text-module.center {
    text-align: center;
}

.text-module.right {
    text-align: right;
}

.text-module.justify {
    text-align: justify;
}

#myElement {
    white-space: pre-line;
}

.text-module p {
    white-space: pre-line;
}

/* Monospace-Schrift für Quill inline-font "monospace" */
.ql-editor .ql-font-monospace,
.text-module .ql-font-monospace {
    font-family: "SFMono-Regular", "Menlo", "Monaco", "Courier New", monospace;
    font-size: 0.95em;
    /* optional anpassen */
    line-height: 1.45;
    white-space: pre-wrap;
    /* erhält Leerzeichen/Zeilenumbrüche, erlaubt Zeilenumbruch */
    word-break: break-word;
}

/* optional: etwas Highlighting/Background bei monospaced Text (wie Inline-Code) */
.ql-editor .ql-font-monospace {
    background: rgba(0, 0, 0, 0.03);
    padding: 0.1em 0.2em;
    border-radius: 4px;
}

.ql-align-left {
    text-align: left !important;
}

.ql-align-center {
    text-align: center !important;
}

.ql-align-right {
    text-align: right !important;
}

.ql-align-justify {
    text-align: justify !important;
}

.leaflet-tooltip {
    background: white;
    border: 1px solid #aaa;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: #333;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
}

.leaflet-tooltip-top::before,
.leaflet-tooltip-bottom::before,
.leaflet-tooltip-left::before,
.leaflet-tooltip-right::before {
    display: none !important;
}

/* Mobile: Rows untereinander statt nebeneinander */
@media (max-width: 768px) {
    .row {
        flex-direction: column !important;
        align-items: stretch;
        gap: 0.75rem;
    }

    /* Kinder sollen volle Breite einnehmen, inline width wird überschrieben */
    .row>* {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* optional: bei zentriertem Text Module mittig ausrichten, aber volle Breite beibehalten */
    .row.text-center>* {
        align-self: stretch;
        text-align: inherit;
    }

    .image-module {
        padding: 0 !important;

        /* Additional styling as needed */
    }

    .text-module {
        padding: 0 !important;
    }
}