/* Modul-Container (auf dieses Modul beschränkt) */
.device-directory-filters {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 25px;
    max-width: 900px;
    margin: 20px auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Allgemeine Formularelemente innerhalb des Moduls */
.device-directory-filters .compact-filter-form {
    margin: 0;
}
.device-directory-filters .filter-section {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.device-directory-filters .filter-section:last-of-type {
    border-bottom: none;
}

/* Überschriften */
.device-directory-filters .section-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    text-transform: uppercase;
}
.device-directory-filters .group-title {
    font-size: 1em;
    font-weight: 600;
    color: #0073aa;
    margin: 0 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #d0d0d0;
}

/* Filterfelder – kompakt und ausschließlich im Modul */
.device-directory-filters .filter-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.device-directory-filters .col-item {
    flex: 1 1 150px;
}
.device-directory-filters .filter-item {
    margin-bottom: 8px;
}
.device-directory-filters .filter-label {
    display: block;
    font-size: 0.85em;
    margin-bottom: 4px;
    color: #555;
}
.device-directory-filters .filter-select {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.85em;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #fafafa;
    transition: border-color 0.2s ease;
}
.device-directory-filters .filter-select:focus {
    border-color: #0073aa;
    outline: none;
}

/* Reset-Button */
.device-directory-filters .btn-reset {
    padding: 6px 12px;
    font-size: 0.9em;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: transparent;
    color: #555;
    cursor: pointer;
    transition: background 0.2s ease;
}
.device-directory-filters .btn-reset:hover {
    background: #f0f0f0;
}



/* Device Directory Styles */
.device-directory {
    margin-top: 2rem;
}

.device-list {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.device-card {
    background: #fff;
    border: none;
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.device-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.device-card-premium {
    background: linear-gradient(to bottom right, #ffffff, #f9f7f0);
    border-left: 4px solid #e6a80d;
}

.device-card-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: start;
}

.device-image {
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.device-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.device-image:hover img {
    transform: scale(1.05);
}

.device-info {
    min-width: 0;
}

.device-title {
    font-size: 1.4rem;
    margin: 0 0 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: #222;
}

.device-title a {
    color: #223;
    text-decoration: none;
    transition: color 0.2s ease;
}

.device-title a:hover {
    color: #0056b3;
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(45deg, #f3c649, #e6a80d);
    color: #5a4500;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.device-company,
.device-type,
.device-model {
    margin-bottom: 0.6rem;
    color: #555;
    font-size: 0.95rem;
}

.device-company a {
    color: #0056b3;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.device-company a:hover {
    text-decoration: underline;
}

.device-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.device-actions .btn {
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.device-actions .btn-primary {
    background: linear-gradient(to bottom, #0069d9, #0056b3);
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.device-actions .btn-primary:hover {
    background: linear-gradient(to bottom, #0062cc, #004fa3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Verbesserte Styles für "Weitere Informationen" */
.device-properties {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eee;
}

.properties-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.properties-toggle:hover {
    background: #e9ecef;
    color: #0056b3;
}

.properties-toggle::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    transition: transform 0.3s ease;
    font-size: 1.1rem;
}

.properties-toggle.collapsed::after {
    transform: rotate(180deg);
}

.properties-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.property-group {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.property-group:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.group-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #dee2e6;
}

/* Verbesserte Styles für Property-Items für flexible Darstellung */
.property-item {
    display: flex;
    flex-direction: column;
    padding: 0.85rem;
    border-radius: 6px;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
    /* Grundlegende Grid-Einstellung für alle Items */
    grid-column: 1 / -1; /* Standardmäßig volle Breite */
    background: rgba(255,255,255,0.5);
}

/* Boolean-Properties speziell behandeln - nur diese bekommen das Grid-Spalten-Layout */
@media (min-width: 768px) {
    .properties-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 Spalten bei größeren Screens */
        gap: 0.75rem;
    }
    
    /* Boolean-Properties kompakt nebeneinander */
    .boolean-property {
        grid-column: auto; /* Erlaubt inline Darstellung */
    }
}

.property-item:last-child {
    border-bottom: none;
}

.property-item:hover {
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.property-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.property-value {
    color: #212529;
    width: 100%;
    word-wrap: break-word; /* Sorgt dafür, dass lange Wörter umbrechen */
    overflow-wrap: break-word;
    line-height: 1.5;
}

/* Boolean Eigenschaften verbessert */
.boolean-property {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
}

.boolean-property i {
    font-size: 1.15rem;
}

/* Hierarchical Boolean Property Styles for Device Directory */
.device-directory .hierarchical-sub-options {
    margin-top: 0.5rem;
    margin-left: 1.75rem; /* Align with the main text */
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.5rem;
    background-color: rgba(248, 249, 250, 0.8);
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.device-directory .hierarchical-sub-options .sub-option {
    display: inline-block;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: 1px solid #90caf9;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.device-directory .hierarchical-sub-options .sub-option:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    color: #0d47a1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive adjustments for hierarchical options */
@media (max-width: 768px) {
    .device-directory .hierarchical-sub-options {
        margin-left: 1rem;
        padding: 0.375rem;
    }
    
    .device-directory .hierarchical-sub-options .sub-option {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}


/* Loading and Error States */
.loading,
.error,
.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.error {
    color: #dc3545;
}

/* Pagination */
.device-pagination {
    margin-top: 2rem;
}

.pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
}

.page-link {
    min-width: 2.5rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .device-card-header {
        grid-template-columns: auto 1fr;
    }

    .device-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
        margin-top: 1rem;
    }

    .device-image {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 576px) {
    .properties-grid {
        grid-template-columns: 1fr;
    }
}

/* Gallery Styles */
.device-gallery {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Device Image Styles */
.device-image {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 8px;
}

.device-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.device-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.device-image:hover img {
    transform: scale(1.05);
}

/* Lightbox Customization */
.lb-outerContainer {
    border-radius: 8px 8px 0 0;
}

.lb-dataContainer {
    border-radius: 0 0 8px 8px;
}

.lb-data .lb-details {
    width: 85%;
    padding-right: 1rem;
}

.lb-data .lb-caption {
    font-size: 1rem;
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .device-image {
        width: 100px;
        height: 100px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 576px) {
    .device-image {
        width: 80px;
        height: 80px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}




/* Bookmark Bar Styles - Completely Redesigned */
.device-bookmark-bar {
    position: fixed; 
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0; /* Removed padding from container */
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.device-bookmark-bar.d-none {
    transform: translateY(100%);
    visibility: hidden; /* Added to ensure it's completely hidden */
    display: none !important; /* Added to ensure no space is taken */
}

.device-bookmark-bar.position-absolute {
    position: absolute;
}

.bookmark-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem; /* Moved padding to inner content */
    gap: 1rem;
}

.bookmark-count {
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.bookmark-count .count-number {
    font-weight: 700;
    color: var(--bs-primary, #0d6efd);
    margin: 0 0.25rem;
    min-width: 1.5rem;
    text-align: center;
}

.bookmark-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.bookmark-actions .btn {
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bookmark-actions .btn small {
    font-size: 0.75em;
    opacity: 0.75;
}

/* Animated badge for count */
.bookmark-count .count-number {
    position: relative;
}

.bookmark-count .count-number.animate {
    animation: pulse 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Bookmark Button in Device Card */
.bookmark-device {
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.bookmark-device.btn-outline-secondary:hover {
    background-color: var(--bs-secondary, #6c757d);
    color: white;
}

.bookmark-device.btn-secondary {
    position: relative;
    overflow: hidden;
}

.bookmark-device i {
    transition: transform 0.2s ease;
}

.bookmark-device:hover i {
    transform: scale(1.1);
}

/* Badge Styles - Angepasst für nebeneinander-Anzeige */
.certification-badge-corner {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    flex-direction: row; /* Geändert von column zu row */
    gap: 8px; /* Etwas mehr Abstand zwischen nebeneinander liegenden Badges */
    align-items: center;
    z-index: 5;
}

.certification-badge {
    width: 50px; /* Etwas kleiner für besseres Nebeneinander */
    height: auto;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.certification-badge:hover {
    transform: scale(1.05);
}

.awards-badge {
    margin-top: 0; /* Entfernt für nebeneinander-Anzeige */
}

.awards-badge-img {
    width: 50px; /* Konsistent mit certification-badge */
    height: auto;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.awards-badge-img:hover {
    transform: scale(1.05);
}

/* Responsive Anpassungen für kleinere Bildschirme */
@media (max-width: 576px) {
    .certification-badge-corner {
        flex-direction: row; /* Bleibt in der Zeile, auch auf mobilen Geräten */
    }
    
    .certification-badge, .awards-badge-img {
        width: 40px; /* Noch kleiner auf mobilen Geräten */
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .bookmark-bar-content {
        flex-direction: row; /* Keep row layout for better space usage */
        flex-wrap: wrap;
        padding: 0.75rem;
    }
    
    .bookmark-actions {
        flex: 1;
        justify-content: flex-end;
        min-width: 200px;
    }
}

@media (max-width: 576px) {
    .bookmark-actions {
        flex-direction: row;
        gap: 0.4rem;
    }
    
    .bookmark-actions .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .bookmark-count {
        font-size: 1rem;
    }
}

/* Property Group Descriptions */
.group-description {
    font-size: 0.9em;
    color: #666;
    margin: 5px 0 10px 0;
    font-style: italic;
}

/* Filter Group Description Box */
.group-description-box {
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    padding: 12px 15px;
    margin: 0 15px 15px 15px;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.group-description-box i {
    color: #007bff;
    font-size: 1.1em;
    margin-top: 2px;
    flex-shrink: 0;
}

.group-description-box span {
    font-size: 0.9em;
    color: #495057;
    line-height: 1.5;
    font-style: italic;
}

/* Responsive adjustment for mobile */
@media (max-width: 576px) {
    .group-description-box {
        margin: 0 10px 10px 10px;
        padding: 10px 12px;
    }
}

/* Hierarchical Filter Styles */
.hierarchical-filter-item {
    margin-bottom: 12px;
}

.hierarchical-sub-filters {
    background-color: rgba(248, 249, 250, 0.6);
    padding: 12px 16px;
    border-radius: 6px;
    margin-left: 16px;
    margin-top: 8px;
    border-left: 2px solid #e9ecef;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.sub-filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.sub-filter-item {
    padding: 0;
    position: relative;
}

.sub-filter-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.8em;
    color: #6c757d;
    font-weight: 400;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1.3;
    background: transparent;
}

.sub-filter-label:hover {
    color: #495057;
    background-color: rgba(255, 255, 255, 0.8);
}

.sub-filter-label input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(0.9);
    accent-color: #007bff;
}

.sub-filter-label input[type="checkbox"]:checked + span {
    color: #007bff;
    font-weight: 500;
}

/* Improved visual hierarchy */
.hierarchical-filter-parent:checked ~ .toggle-slider {
    background-color: #28a745;
}

.hierarchical-sub-filters.active {
    background-color: rgba(248, 249, 250, 0.9);
    border-left-color: #007bff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Better spacing and typography */
.sub-filter-label span {
    flex: 1;
    word-break: break-word;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hierarchical-sub-filters {
        margin-left: 12px;
        padding: 10px 12px;
    }
    
    .sub-filters-container {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .sub-filter-label {
        font-size: 0.75em;
        padding: 5px 6px;
    }
}

@media (max-width: 576px) {
    .hierarchical-sub-filters {
        margin-left: 8px;
        padding: 8px 10px;
    }
}