/* Figure Viewer Page Styles */
.figure-viewer-container {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.figure-viewer-header {
    margin-bottom: 20px;
    padding: 0 0 16px 0;
    border-bottom: 1px solid #e9ecef;
}

.figure-viewer-title {
    font-size: 2rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.figure-viewer-subtitle {
    color: #6c757d;
    font-size: 0.925rem;
    margin: 0;
    max-width: 800px;
}

.figure-input-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.figure-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.figure-input-row .path-input {
    flex: 1;
}

.figure-input-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.figure-path-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: 'Monaco', 'Consolas', monospace;
}

.figure-path-input:focus {
    border-color: #663fdb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 63, 219, 0.15);
}

.figure-add-btn {
    background: #663fdb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.figure-add-btn:hover {
    background: #5533b8;
}

.figure-add-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #6c757d;
}

.figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.figures-grid.single-figure {
    grid-template-columns: 1fr;
}

.figures-grid.two-figures {
    grid-template-columns: repeat(2, 1fr);
}

.figure-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
}

.figure-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.figure-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.figure-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    font-family: 'Monaco', 'Consolas', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 40px);
}

.figure-remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.figure-remove-btn:hover {
    background: rgba(220, 53, 69, 0.1);
}

.figure-card-body {
    padding: 16px;
    min-height: 400px;
}

.figure-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #6c757d;
}

.figure-loading i {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #663fdb;
}

.figure-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #dc3545;
    text-align: center;
    padding: 20px;
}

.figure-error i {
    font-size: 2rem;
    margin-bottom: 12px;
}

.figure-error-message {
    font-size: 0.9rem;
    max-width: 400px;
}

.empty-state {
    background: #ffffff;
    border-radius: 8px;
    padding: 60px 40px;
    text-align: center;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.empty-state i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 16px;
}

.empty-state h4 {
    color: #212529;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: #6c757d;
    margin: 0;
}

.figure-count-badge {
    background: #663fdb;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.clear-all-btn {
    background: none;
    border: 2px solid #dc3545;
    color: #dc3545;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.clear-all-btn:hover {
    background: #dc3545;
    color: white;
}

.figures-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.path-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 8px;
}

.path-hint code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}
