/* Custom CSS for GEM Vulnerability Models Documentation */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Roboto+Slab:wght@400;700&family=Roboto+Mono&display=swap');

/* General styling */
body {
    font-family: 'Lato', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Slab', serif;
}

code, pre {
    font-family: 'Roboto Mono', monospace;
}

/* Viewer Container Styles */
.viewer-container {
    background: #ffffff;
    border: 1px solid #e1e4e5;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.viewer-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.control-row:last-child {
    margin-bottom: 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    flex: 1;
}

.control-group label {
    font-weight: 600;
    color: #404040;
    margin-bottom: 6px;
    font-size: 13px;
}

.viewer-select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.viewer-select:hover {
    border-color: #2980b9;
}

.viewer-select:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.2);
}

/* Buttons */
.viewer-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Lato', sans-serif;
    margin-right: 8px;
    margin-top: 10px;
}

.viewer-btn:last-child {
    margin-right: 0;
}

.btn-primary {
    background: #2980b9;
    color: white;
}

.btn-primary:hover {
    background: #1a5276;
    transform: translateY(-1px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #1e8449;
}

/* Selection Tags */
.viewer-selections {
    min-height: 40px;
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selection-tag {
    display: inline-flex;
    align-items: center;
    background: #eaf2f8;
    border: 1px solid #d4e6f1;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    color: #1a5276;
}

.selection-tag .remove-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    margin-left: 8px;
    font-size: 16px;
    font-weight: bold;
    padding: 0;
    line-height: 1;
}

.selection-tag .remove-btn:hover {
    color: #c0392b;
}

/* Plot Areas */
.viewer-plot {
    min-height: 500px;
    background: #fcfcfc;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin: 15px 0;
}

.viewer-plot-row {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.viewer-plot-half {
    flex: 1;
    min-height: 400px;
    background: #fcfcfc;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

/* Map */
.viewer-map {
    height: 350px;
    background: #fcfcfc;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
}

.viewer-region-display {
    text-align: center;
    padding: 10px;
    font-weight: 600;
    color: #2c3e50;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Section Styling */
.viewer-section {
    margin: 25px 0;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.viewer-section:first-child {
    border-top: none;
    padding-top: 0;
}

.viewer-section h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

.viewer-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Parameters Display */
.viewer-params {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.param-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
}

.param-card h5 {
    margin: 0 0 10px 0;
    color: #1a5276;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-card p {
    margin: 5px 0;
    font-size: 13px;
    font-family: 'Roboto Mono', monospace;
}

/* Slider Controls */
.slider-controls {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 15px;
}

.slider-controls .control-group {
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.slider-controls label {
    margin-bottom: 0;
    min-width: 120px;
}

.slider-controls input[type="range"] {
    flex: 1;
    max-width: 300px;
}

.slider-controls span {
    min-width: 40px;
    text-align: right;
    font-family: 'Roboto Mono', monospace;
}

/* Loading State */
.viewer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #6c757d;
}

.viewer-loading::after {
    content: "Loading...";
    font-style: italic;
}

/* Error State */
.viewer-error {
    padding: 20px;
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    color: #721c24;
    text-align: center;
}

/* Empty State */
.viewer-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #6c757d;
    font-style: italic;
    background: #fcfcfc;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .control-row {
        flex-direction: column;
    }
    
    .control-group {
        width: 100%;
    }
    
    .viewer-plot-row {
        flex-direction: column;
    }
    
    .viewer-plot-half {
        min-height: 300px;
    }
}

/* Info boxes */
.info-box {
    background: #eaf2f8;
    border-left: 4px solid #2980b9;
    padding: 12px 15px;
    border-radius: 0 4px 4px 0;
    margin: 15px 0;
    font-size: 14px;
}

/* RTD theme overrides */
.wy-nav-content {
    max-width: 1000px;
}

.rst-content .note {
    background: #eaf2f8;
}

.rst-content .note .admonition-title {
    background: #2980b9;
}
