/* Custom CSS for bibliography filtering */

.bibliography-filters {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0 30px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-group {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
    vertical-align: top;
}

.filter-group-vertical {
    display: inline-block;
    vertical-align: top;
    margin-right: 20px;
}

.filter-group label, .filter-label-main {
    font-weight: 600;
    margin-right: 8px;
    color: #343a40;
    font-size: 14px;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.filter-select:hover {
    border-color: #80bdff;
}

.filter-select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Checkbox group */
.checkbox-group {
    margin-top: 8px;
}

.checkbox-label {
    display: block;
    padding: 4px 0;
    cursor: pointer;
    font-weight: normal;
    color: #495057;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-text {
    vertical-align: middle;
}

/* Implementation circles */
.impl-circle {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 6px;
    margin-left: 2px;
    vertical-align: middle;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid rgba(0,0,0,0.1);
}

.impl-circle:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.impl-circle.clickable {
    cursor: pointer;
}

.impl-circle.not-clickable {
    cursor: default;
    opacity: 0.6;
}

/* Color scheme for different implementations */
.impl-none {
    background-color: #6c757d; /* Gray for not implemented */
}

.impl-pykal {
    background-color: #007bff; /* Blue for pykal core */
}

.impl-turtlebot {
    background-color: #28a745; /* Green for TurtleBot */
}

.impl-crazyflie {
    background-color: #ffc107; /* Yellow/Gold for Crazyflie */
}

/* Legend box */
.legend-box {
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 20px 0;
    font-size: 13px;
}

.legend-items {
    margin-top: 8px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Citation entry styling */
.citation-impl-badges {
    display: inline-flex;
    gap: 6px;
    margin-left: 10px;
    vertical-align: middle;
}

.reset-button {
    padding: 6px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s ease-in-out;
    margin-left: 10px;
    margin-top: 10px;
}

.reset-button:hover {
    background-color: #5a6268;
}

.reset-button:active {
    background-color: #545b62;
}

/* Bibliography entry styling */
ol li {
    margin-bottom: 15px;
    padding: 10px;
    border-left: 3px solid transparent;
    transition: background-color 0.2s ease;
}

ol li:hover {
    background-color: #f8f9fa;
}

ol li.has-impl-pykal {
    border-left-color: #007bff;
}

ol li.has-impl-turtlebot {
    border-left-color: #28a745;
}

ol li.has-impl-crazyflie {
    border-left-color: #ffc107;
}

/* Tooltip for circles */
.impl-circle[title] {
    position: relative;
}

/* Responsive design */
@media (max-width: 768px) {
    .filter-group {
        display: block;
        margin-bottom: 15px;
    }

    .filter-group-vertical {
        display: block;
        width: 100%;
    }

    .filter-select {
        width: 100%;
        max-width: 300px;
    }

    .reset-button {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        max-width: 300px;
    }

    .legend-items {
        flex-direction: column;
        gap: 8px;
    }
}

/* Download link styling */
.download-link {
    font-size: 12px;
    color: #007bff;
    text-decoration: none;
    margin-left: 5px;
}

.download-link:hover {
    text-decoration: underline;
}

/* Notebook link indicator */
.notebook-indicator {
    background-color: #e7f3ff;
    border-left: 3px solid #007bff;
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
}

.notebook-indicator a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.notebook-indicator a:hover {
    text-decoration: underline;
}

/* Note section styling - render in red for better readability */
.citation .note,
dd .note,
.citation-list .note,
p.note {
    color: #dc3545;
    font-weight: 500;
    font-style: italic;
}

/* Sphinxcontrib-bibtex note field styling */
.docutils .note-field,
.citation .field-list .field-name:contains("Note") + .field-body,
dd > em:first-child {
    color: #dc3545;
    font-weight: 500;
}

/* Target note content within bibliography entries */
.citation dd,
.citation-list dd {
    color: inherit;
}

.citation dd .note,
.citation-list dd .note {
    color: #dc3545;
    font-weight: 500;
    font-style: italic;
}
