/* Unified Search Component Styles */
.unified-search-component {
    width: 100%;
}

/* Search container styling */
.search-section, .ketcher-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* Search input styling - Font from Redoxsystems, Size from Substances */
#query-input {
    font-size: 15px;
}

.unified-search-component .search-form label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
    color: #555;
}

.unified-search-component .nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.unified-search-component .nav-link {
    font-weight: 500;
    color: #495057;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.unified-search-component .nav-link.active {
    color: var(--brand-primary); /* Primary active tab text color */
    background: transparent;
    border-bottom: 2px solid var(--brand-primary); /* Primary active tab border color */
}

/* Ketcher specific styles */
.ketcher-frame-container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px; /* Maintains 3:2 ratio when height is capped at 600px */
    aspect-ratio: 3 / 2;
    min-height: 350px; /* Sensible minimum for small screens */
    max-height: 80vh;  /* 4/5 of display height */
    /* Secondary cap for very large screens */
    max-height: min(80vh, 600px);
    margin: 0 auto; /* Keep centered if max-width is reached */
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
}

.ketcher-frame {
    flex: 1;
    width: 100%;
    border: none;
}

.ketcher-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 15px;
    background-color: #f1f3f5;
    border-top: 1px solid #dee2e6;
}

.ketcher-status {
    font-size: 0.9rem;
    color: #6c757d;
}

.ketcher-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

/* Mode selector */
.mode-selector .btn {
    min-width: 100px;
    font-weight: 500;
}

.mode-selector .btn.active {
    background-color: var(--brand-primary); /* Primary active button background */
    color: white;
}

/* Unified search form buttons */
.unified-search-component .search-form .btn-group .btn {
    flex: 1;
    white-space: nowrap;
}

/* Search settings */
.search-settings-section {
    font-size: 0.9rem;
}

.search-settings-section label {
    font-weight: 600;
    color: #555;
}

