/**
 * XSLT Viewer Enhancer Styles
 * CSS für Info-Popups und erweiterte Funktionalität
 */

/* Info-Popup Styling */
.xslt-info-popup {
    position: fixed;
    background: white;
    border: 2px solid #2196F3;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    max-width: 400px;
    min-width: 250px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s, transform 0.3s;
}

.xslt-info-popup.show {
    opacity: 1;
    transform: scale(1);
}

.xslt-popup-header {
    font-weight: bold;
    color: #1976D2;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.xslt-popup-content {
    color: #333;
    font-size: 13px;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
}

.xslt-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: #f44336;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    transition: background 0.2s;
}

.xslt-popup-close:hover {
    background: #d32f2f;
}

.xslt-popup-close:active {
    transform: scale(0.95);
}

/* Toggle-Indikator Styling */
.toggle-indicator {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s;
    color: inherit;
}

/* Collapsed State */
.collapsed .toggle-indicator {
    transform: rotate(-90deg);
}

/* Group Content Wrapper */
.group-content-wrapper,
.fieldset-content-wrapper {
    transition: max-height 0.3s ease-out, opacity 0.3s;
    overflow: hidden;
}

/* Enhanced Info Icons */
[data-enhanced="true"] {
    cursor: help !important;
    transition: transform 0.2s;
}

[data-enhanced="true"]:hover {
    transform: scale(1.2);
}

/* Enhanced Group Headers */
[data-toggle-enhanced="true"] {
    cursor: pointer !important;
    user-select: none;
    transition: background 0.2s;
}

[data-toggle-enhanced="true"]:hover {
    background: rgba(33, 150, 243, 0.05);
}

/* Responsive Popup */
@media (max-width: 768px) {
    .xslt-info-popup {
        max-width: calc(100vw - 40px);
        left: 20px !important;
        right: 20px;
    }
}

/* Animation für Gruppen-Toggle */
@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 2000px;
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        max-height: 2000px;
        opacity: 1;
    }
    to {
        max-height: 0;
        opacity: 0;
    }
}

/* Scrollbar für Popup-Content */
.xslt-popup-content::-webkit-scrollbar {
    width: 6px;
}

.xslt-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.xslt-popup-content::-webkit-scrollbar-thumb {
    background: #2196F3;
    border-radius: 3px;
}

.xslt-popup-content::-webkit-scrollbar-thumb:hover {
    background: #1976D2;
}
