/* assets/css/frontend.css */

/* QR Scanner Styles */
.bbc-suggested-action {
    box-shadow: 0 0 10px rgba(0, 115, 170, 0.5) !important;
    transform: scale(1.05);
}

/* Search Component */
.bbc-search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.bbc-search-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.bbc-search-form h3 {
    margin-top: 0;
    color: #0073aa;
}

.bbc-search-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.bbc-search-input {
    flex: 1;
    min-width: 250px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.bbc-search-select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    background: white;
}

.bbc-search-results {
    margin-top: 20px;
}

.bbc-result-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.bbc-result-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.bbc-result-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.bbc-no-photo-placeholder {
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    border: 1px solid #ddd;
    color: #666;
    font-size: 12px;
}

.bbc-result-info h4 {
    margin: 0 0 5px 0;
    color: #0073aa;
    font-size: 18px;
}

.bbc-result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.bbc-detail-item {
    display: flex;
    flex-direction: column;
}

.bbc-detail-label {
    font-weight: bold;
    color: #333;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.bbc-detail-value {
    color: #666;
    font-size: 14px;
}

.bbc-borrowed-books, .bbc-history {
    margin-top: 20px;
}

.bbc-borrowed-books h5, .bbc-history h5 {
    color: #0073aa;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.bbc-book-list, .bbc-history-list {
    background: #f9f9f9;
    border-radius: 3px;
    padding: 15px;
}

.bbc-book-item, .bbc-history-item {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bbc-book-item:last-child, .bbc-history-item:last-child {
    border-bottom: none;
}

.bbc-book-info, .bbc-history-info {
    flex: 1;
}

.bbc-book-name, .bbc-history-book {
    font-weight: bold;
    color: #333;
}

.bbc-book-date, .bbc-history-date {
    font-size: 12px;
    color: #666;
}

.bbc-status-badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.bbc-status-borrowed {
    background-color: #ffb900;
    color: white;
}

.bbc-status-returned {
    background-color: #46b450;
    color: white;
}

.bbc-status-available {
    background-color: #0073aa;
    color: white;
}

/* Borrow Logs Component */
.bbc-borrow-logs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.bbc-filters-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.bbc-filters-section h3 {
    margin-top: 0;
    color: #0073aa;
}

.bbc-filters-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.bbc-filters-form select, .bbc-filters-form input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    background: white;
}

.bbc-logs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.bbc-logs-table th, .bbc-logs-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bbc-logs-table th {
    background-color: #0073aa;
    color: white;
    font-weight: bold;
}

.bbc-logs-table tbody tr:hover {
    background-color: #f5f5f5;
}

.bbc-logs-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.bbc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.bbc-pagination a, .bbc-pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #0073aa;
    border-radius: 3px;
}

.bbc-pagination .current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.bbc-pagination a:hover {
    background-color: #f0f8ff;
}

.bbc-export-btn {
    background-color: #46b450;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.bbc-export-btn:hover {
    background-color: #3a9940;
}

.bbc-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.bbc-stat-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
}

.bbc-stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.bbc-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bbc-qr-scanner-container,
    .bbc-search-container,
    .bbc-borrow-logs-container {
        padding: 10px;
    }
    
    .bbc-search-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bbc-search-input {
        min-width: auto;
    }
    
    .bbc-result-header {
        flex-direction: column;
        text-align: center;
    }
    
    .bbc-result-details {
        grid-template-columns: 1fr;
    }
    
    .bbc-filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bbc-logs-table {
        font-size: 12px;
    }
    
    .bbc-logs-table th, .bbc-logs-table td {
        padding: 8px 4px;
    }
    
    .bbc-summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .bbc-summary-stats {
        grid-template-columns: 1fr;
    }
    
    .bbc-logs-table th, .bbc-logs-table td {
        padding: 6px 2px;
        font-size: 11px;
    }
    
    .bbc-book-item, .bbc-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Print Styles */
@media print {
    .bbc-filters-section,
    .bbc-pagination,
    .bbc-export-btn,
    .bbc-btn {
        display: none !important;
    }
    
    .bbc-logs-table {
        border: 1px solid #000;
    }
    
    .bbc-logs-table th, .bbc-logs-table td {
        border: 1px solid #000;
        padding: 8px;
    }
    
    .bbc-logs-table th {
        background-color: #f0f0f0 !important;
        color: #000 !important;
    }
}