/* Advanced Search & Filtering Styles */

/* Enhanced Search Section */
.search-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box {
    position: relative;
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 18px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.15);
    transform: translateY(-1px);
}

.search-button {
    padding: 18px 30px;
    background: linear-gradient(135deg, #2E7D32, #388E3C);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.search-button:hover {
    background: linear-gradient(135deg, #1b5e20, #2E7D32);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

/* Enhanced Filter Options */
.filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.filter-select:hover {
    border-color: #4caf50;
}

/* Search Suggestions */
.search-suggestions {
    margin-top: 20px;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.suggestion-label {
    font-weight: bold;
    color: #666;
    margin-right: 10px;
}

.suggestion-tag {
    background: #e8f5e8;
    color: #2E7D32;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #c8e6c9;
}

.suggestion-tag:hover {
    background: #2E7D32;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

/* Autocomplete */
.autocomplete-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #2E7D32;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
}

.autocomplete-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.2s ease;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.suggestion-type {
    background: #2E7D32;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.suggestion-text {
    font-weight: bold;
    color: #333;
    flex: 1;
}

.suggestion-herb {
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* Enhanced Herb Cards */
.herb-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.herb-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2E7D32, #4caf50);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.herb-card:hover::before {
    transform: scaleX(1);
}

.herb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.herb-card h3 {
    color: #2E7D32;
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-weight: bold;
}

.herb-card h4 {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
    font-size: 1rem;
}

.herb-benefits {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.herb-details {
    margin-bottom: 20px;
}

.herb-details > div {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #666;
}

.herb-details strong {
    color: #333;
}

/* Safety and Effectiveness Labels */
.safety-generally-safe {
    background: #4caf50;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

.safety-caution {
    background: #ff9800;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

.safety-professional {
    background: #f44336;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

.effectiveness-very-high {
    background: #9c27b0;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

.effectiveness-high {
    background: #2196f3;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

.effectiveness-moderate {
    background: #ff9800;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

.effectiveness-traditional {
    background: #795548;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Herb Actions */
.herb-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-primary, .btn-secondary {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2E7D32;
    color: white;
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
}

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

/* Modals */
.cross-reference-modal,
.herb-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    color: #2E7D32;
    margin-bottom: 25px;
    padding-right: 40px;
}

.cross-reference-sections {
    display: grid;
    gap: 25px;
}

.cross-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.cross-section ul {
    list-style: none;
    padding: 0;
}

.cross-section li {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.cross-section li:hover {
    background: #e8f5e8;
}

.cross-section a {
    color: #2E7D32;
    text-decoration: none;
    font-weight: 500;
}

.cross-section a:hover {
    text-decoration: underline;
}

.herb-details-content {
    margin-bottom: 25px;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.detail-section p {
    color: #666;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Filter Stats */
.filter-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-results h3 {
    color: #333;
    margin-bottom: 10px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .search-section {
        padding: 25px;
    }
    
    .search-box {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-options {
        grid-template-columns: 1fr;
    }
    
    .herb-actions {
        flex-direction: column;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .autocomplete-container {
        position: relative;
        margin-top: 10px;
    }
}

/* Enhanced Status Indicators */
.herb-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-complete {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.status-basic {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.status-pending {
    background: linear-gradient(135deg, #9e9e9e, #bdbdbd);
    color: white;
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.3);
}

/* Loading States */
.search-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2E7D32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Filter Chips */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.filter-chip {
    background: #e8f5e8;
    color: #2E7D32;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #c8e6c9;
}

.filter-chip .remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
}

.filter-chip .remove:hover {
    color: #1b5e20;
} 

.clear-filters-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
    margin-top: 10px;
}

.clear-filters-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.clear-filters-btn:active {
    transform: translateY(0);
}

/* Search Results Section */
.search-results-section {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-in-out;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.results-title {
    font-size: 18px;
    font-weight: bold;
    color: #2E7D32;
    margin: 0;
}

.results-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.herb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #e0e0e0;
}

.no-results h3 {
    color: #666;
    margin-bottom: 10px;
    font-size: 18px;
}

.no-results p {
    color: #888;
    font-size: 14px;
} 

/* Letter Navigation Styles */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.letter-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 50%;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.letter-link:hover {
    background: #e9ecef;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.letter-link.active {
    background: linear-gradient(135deg, #2E7D32, #388E3C);
    color: white;
    border-color: #2E7D32;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.letter-link.active:hover {
    background: linear-gradient(135deg, #1b5e20, #2E7D32);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

/* Content Section Styles */
.content-section {
    margin-bottom: 50px;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.section-title {
    color: #2E7D32;
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e8f5e8;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #2E7D32, #4caf50);
    border-radius: 2px;
}

/* Responsive Design for Letter Navigation */
@media (max-width: 768px) {
    .alphabet-nav {
        gap: 6px;
        padding: 15px;
    }
    
    .letter-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .content-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .alphabet-nav {
        gap: 4px;
        padding: 10px;
    }
    
    .letter-link {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
} 