/* WebX Hütten - Extension-specific styles */
/* Sitepackage uses Bootstrap 4.5 */

.tx-webxhuetten {
    margin-bottom: 2rem;
}

/* BS5 badge classes → BS4 compatibility + padding fix */
.badge.bg-success { background-color: #28a745 !important; color: #fff; }
.badge.bg-warning { background-color: #ffc107 !important; color: #212529; }
.badge.bg-info { background-color: #17a2b8 !important; color: #fff; }
.badge.bg-secondary { background-color: #6c757d !important; color: #fff; }
.badge.bg-danger { background-color: #dc3545 !important; color: #fff; }
.badge.bg-light { background-color: #f8f9fa !important; color: #212529; }

/* Badge padding - damit Text nicht am Rand klebt */
.tx-webxhuetten .badge {
    padding: 0.4em 0.8em;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Description - Fließtext kompakter */
.tx-webxhuetten .webx-description p {
    margin-bottom: 0.4rem;
    line-height: 1.5;
}
.tx-webxhuetten .webx-description br + br {
    display: none;
}
.tx-webxhuetten .webx-description {
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}

/* Card hover effect */
.webx-huetten-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0,0,0,.08);
}
.webx-huetten-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12) !important;
}

/* Card image */
.webx-huetten-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Status badges */
.webx-huetten-card .badge {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Contact buttons in cards */
.webx-huetten-card .d-flex {
    position: relative;
    z-index: 2;
}
.webx-huetten-card .btn-sm {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Map container */
contwise-maps {
    min-height: 300px;
    display: block;
    border-radius: 0.25rem;
}

/* Filter bar */
#huetten-filter {
    border: 1px solid rgba(0,0,0,.08);
}
@media (min-width: 768px) {
    #huetten-filter {
        position: sticky;
        top: 0;
        z-index: 200;
        background: #fff;
    }
}

/* Quick filter button active state */
[data-quick-filter].active {
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Section headings */
.tx-webxhuetten h3.h5 {
    padding-bottom: 0.5rem;
    border-bottom: 2px solid currentColor;
    margin-top: 1rem;
}

/* Carousel - ensure BS4 carousel works even if sitepackage CSS is incomplete */
.tx-webxhuetten .carousel {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
}
.tx-webxhuetten .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.tx-webxhuetten .carousel-item {
    display: none;
    position: relative;
    width: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s ease-in-out;
}
.tx-webxhuetten .carousel-item.active,
.tx-webxhuetten .carousel-item-next,
.tx-webxhuetten .carousel-item-prev {
    display: block;
}
.tx-webxhuetten .carousel-item img {
    height: 450px;
    object-fit: cover;
    width: 100%;
}
.tx-webxhuetten .carousel-control-prev,
.tx-webxhuetten .carousel-control-next {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15%;
    color: #fff;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    background: none;
    border: 0;
}
.tx-webxhuetten .carousel-control-prev:hover,
.tx-webxhuetten .carousel-control-next:hover {
    opacity: 0.9;
}
.tx-webxhuetten .carousel-control-prev {
    left: 0;
}
.tx-webxhuetten .carousel-control-next {
    right: 0;
}
.tx-webxhuetten .carousel-indicators {
    position: absolute;
    right: 0;
    bottom: 10px;
    left: 0;
    z-index: 15;
    display: flex;
    justify-content: center;
    padding-left: 0;
    margin: 0 15%;
    list-style: none;
}
.tx-webxhuetten .carousel-indicators li {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 3px;
    background-color: rgba(255,255,255,0.5);
    border: 0;
    cursor: pointer;
}
.tx-webxhuetten .carousel-indicators li.active {
    background-color: #fff;
}
.tx-webxhuetten .carousel-caption {
    position: absolute;
    right: 15%;
    bottom: 20px;
    left: 15%;
    z-index: 10;
    padding: 10px 0;
    color: #fff;
    text-align: center;
}

/* Öffnungszeiten accordion link style */
.tx-webxhuetten #openingHoursAccordion a[data-toggle="collapse"] {
    cursor: pointer;
}
.tx-webxhuetten #openingHoursAccordion a[data-toggle="collapse"]:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 575.98px) {
    .webx-huetten-card .card-img-top {
        height: 160px;
    }
    .tx-webxhuetten .carousel-item img {
        height: 250px;
    }
    contwise-maps {
        min-height: 250px;
    }
}

/* Print styles */
@media print {
    #huetten-filter,
    .btn,
    contwise-maps,
    contwise-resource-printview,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators {
        display: none !important;
    }
    .webx-huetten-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc;
    }
}

/* Hidden items for JS filter */
.webx-huetten-hidden {
    display: none !important;
}
