/* GPAI Glossar - Floating Button & Panel Styles */

#gpai-glossar-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    font-weight: bold;
    line-height: 1;
}

#gpai-glossar-toggle.gpai-pos-bottom-right {
    left: auto;
    right: 30px;
}

#gpai-glossar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

#gpai-glossar-toggle:active {
    transform: scale(0.95);
}

#gpai-glossar-panel {
    position: fixed;
    bottom: 105px;
    left: 30px;
    width: 420px;
    max-width: calc(100vw - 60px);
    max-height: 70vh;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#gpai-glossar-panel.gpai-pos-bottom-right {
    left: auto;
    right: 30px;
}

#gpai-glossar-panel.gpai-active {
    display: flex;
    animation: gpaiSlideIn 0.3s ease;
}

@keyframes gpaiSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gpai-glossar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 18px 20px;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.gpai-glossar-header span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gpai-glossar-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
    line-height: 1;
}

.gpai-glossar-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.gpai-glossar-search {
    padding: 14px 18px;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.gpai-glossar-search input {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.gpai-glossar-search input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.gpai-glossar-count {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    padding-left: 2px;
}

.gpai-glossar-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
    scroll-behavior: smooth;
}

.gpai-glossar-content::-webkit-scrollbar {
    width: 6px;
}

.gpai-glossar-content::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.gpai-glossar-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.gpai-glossar-item {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
}

.gpai-glossar-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.gpai-glossar-term {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 6px;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.gpai-glossar-definition {
    color: #444;
    line-height: 1.65;
    font-size: 13px;
}

.gpai-glossar-empty {
    text-align: center;
    color: #aaa;
    padding: 40px 20px;
    font-style: italic;
    font-size: 14px;
}

.gpai-glossar-footer {
    padding: 10px 18px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
    flex-shrink: 0;
}

.gpai-glossar-footer a {
    font-size: 11px;
    color: #bbb;
    text-decoration: none;
}

.gpai-glossar-footer a:hover {
    color: #667eea;
}

/* Mobile */
@media (max-width: 600px) {
    #gpai-glossar-toggle {
        width: 52px;
        height: 52px;
        bottom: 20px;
        left: 16px;
        font-size: 22px;
    }

    #gpai-glossar-toggle.gpai-pos-bottom-right {
        left: auto;
        right: 16px;
    }

    #gpai-glossar-panel {
        bottom: 82px;
        left: 10px;
        width: calc(100vw - 20px);
        max-width: 100%;
        max-height: 65vh;
    }

    #gpai-glossar-panel.gpai-pos-bottom-right {
        left: 10px;
        right: auto;
    }
}
