/* Estilos específicos para la página de consulta */

/* Page Header */
.page-header {
    margin-top: 70px;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800)) !important;
    color: #fff !important;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: #fff !important;
}

.page-header h1 i {
    margin-right: 15px;
    color: var(--color-accent-yellow) !important;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    color: #fff !important;
}

/* Search Section */
.search-section {
    padding: 60px 20px;
    background-color: #f8f9fa;
}

.search-card {
    background: var(--color-bg) !important;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--color-border) !important;
}

.search-card h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
}

.search-card h2 i {
    margin-right: 10px;
    color: #3498db;
}

/* Botón de búsqueda */
.search-btn {
    background: var(--color-accent-yellow) !important;
    border-color: #d4a20b !important;
    color: #1f2937 !important;
}
.search-btn:hover {
    background: #e2b40e !important;
    border-color: #c7960a !important;
}

/* Form Styles */
.search-form {
    max-width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.form-group label i {
    margin-right: 8px;
    color: #3498db;
    width: 16px;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input::placeholder {
    color: #95a5a6;
}

/* Year Range Specific Styles */
.year-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-range input {
    flex: 1;
}

.year-range span {
    color: #7f8c8d;
    font-weight: 500;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
}

.btn-info {
    background: linear-gradient(135deg, #1abc9c, #16a085);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #16a085, #138d75);
    transform: translateY(-2px);
}

/* Results Section */
.results-section {
    padding: 60px 20px;
    background-color: white;
    min-height: 400px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.results-header h2 {
    color: var(--color-primary-700) !important;
    font-size: 1.8rem;
    margin: 0;
}

.results-header h2 i {
    margin-right: 10px;
    color: #3498db;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

#resultsCount {
    color: #7f8c8d;
    font-weight: 500;
}

.view-options {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #7f8c8d;
}

.view-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.view-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #3498db;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #e74c3c;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Results Table */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

.results-table th {
    background-color: var(--color-primary-600) !important;
    color: #fff !important;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #1a252f;
}

.results-table th i {
    margin-right: 5px;
    opacity: 0.8;
}

.results-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.results-table tbody tr:hover {
    background-color: #f3f7f5 !important;
}

.results-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-disponible {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-prestado {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-atrasado {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-reservado {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-perdido {
    background-color: #343a40;
    color: #ffffff;
    border: 1px solid #495057;
}

.status-en_reparacion {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.status-solo_biblioteca {
    background-color: #ffeaa7;
    color: #6c757d;
    border: 1px solid #fdcb6e;
}

/* Action Buttons */
.action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.btn-view {
    background-color: #3498db;
    color: white;
}

.btn-view:hover {
    background-color: #2980b9;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
}

.btn-edit:hover {
    background-color: #e67e22;
}

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

.btn-delete:hover {
    background-color: #c0392b;
}

/* Cards View */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.book-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

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

.book-card h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.book-card .author {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 15px;
}

.book-card .details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.book-card .detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.book-card .detail-item i {
    color: #3498db;
    width: 12px;
}

.book-card .actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 15px;
    border: 2px solid #e1e8ed;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #7f8c8d;
    font-weight: 500;
}

.page-btn:hover:not(:disabled) {
    background: var(--color-primary-600) !important;
    border-color: var(--color-primary-600) !important;
    color: #fff !important;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.active {
    background: var(--color-primary-600) !important;
    border-color: var(--color-primary-600) !important;
    color: #fff !important;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #7f8c8d;
    min-width: 40px;
    text-align: center;
}

.page-number:hover {
    border-color: #3498db;
    color: #3498db;
}

.page-number.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

/* Active nav link */
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    border-radius: 5px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .search-card {
        padding: 25px 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .results-table {
        font-size: 0.8rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 6px;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .page-header {
        padding: 40px 20px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .search-section,
    .results-section {
        padding: 40px 15px;
    }
    
    .year-range {
        flex-direction: column;
        gap: 10px;
    }
    
    .year-range span {
        display: none;
    }
}