/**
 * Book Manager — Main Stylesheet
 * Extracted inline styles from PHP templates
 */

/* Catalog grid (archive-bm_book.php, frontend.php bm_catalog_shortcode) */
.bm-catalog { max-width:1000px; margin:0 auto; padding:20px; }
.bm-filters { display:flex; gap:10px; flex-wrap:wrap; margin:20px 0; align-items:end; }
.bm-filters label { display:block; font-size:12px; font-weight:bold; margin-bottom:3px; }
.bm-filters input[type="text"], .bm-filters select { padding:6px 10px; border:1px solid #ccc; border-radius:4px; }
.bm-filters input[type="text"] { min-width:200px; }
.bm-book-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:20px; margin-top:20px; }
.bm-book-card { background:#fff; border-radius:6px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,0.1); transition:transform 0.2s ease, box-shadow 0.2s ease; }
.bm-book-card:hover { transform:translateY(-4px); box-shadow:0 6px 20px rgba(0,0,0,0.15); }
.bm-book-card a { text-decoration:none; color:inherit; }
.bm-card-cover img { width:100%; height:220px; object-fit:cover; display:block; }
.bm-card-no-cover { height:220px; background:#f0f0f0; display:flex; align-items:center; justify-content:center; color:#999; font-size:14px; }
.bm-card-info { padding:10px; }
.bm-card-info h3 { font-size:14px; margin:0 0 5px 0; line-height:1.3; }
.bm-card-info p { font-size:12px; color:#666; margin:0; }
.bm-pagination { margin-top:30px; text-align:center; }
.bm-btn-filter { padding:6px 15px; background:#111; color:#fff; border:none; border-radius:4px; cursor:pointer; }
.bm-btn-filter:hover { background:#333; }
.bm-btn-clear { padding:6px 15px; background:#eee; color:#333; text-decoration:none; border-radius:4px; font-size:14px; }
.bm-btn-clear:hover { background:#ddd; }
.bm-btn-reserve { padding:4px 10px; background:#111; color:#fff; border:none; border-radius:3px; cursor:pointer; font-size:12px; margin-top:5px; }
.bm-btn-reserve:hover { background:#333; }

/* Single book review cards (single-bm_book.php) */
@media (max-width:480px) {
    .bm-review-card-inner { flex-direction:column !important; align-items:center !important; text-align:center; }
    .bm-review-cover { width:40px !important; height:56px !important; margin-bottom:5px; }
    .bm-review-meta { font-size:11px; }
    .bm-review-text { font-size:12px; }
}

/* Catalog responsive breakpoints (archive-bm_book.php, frontend.php) */
@media (max-width:768px) {
    .bm-book-grid { grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:16px; }
    .bm-card-cover img, .bm-card-no-cover { height:200px; }
}
@media (max-width:480px) {
    .bm-book-grid { grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); gap:10px; }
    .bm-card-cover img, .bm-card-no-cover { height:170px; }
    .bm-filters { flex-direction:column; }
    .bm-filters > div { width:100%; }
    .bm-filters input[type="text"] { width:100%; }
    .bm-filters select { width:100%; }
}

/* Account tabs (users-circulacao.php) */
.bm-account-tabs { display:flex; gap:0; margin-bottom:20px; border-bottom:2px solid #ddd; }
.bm-account-tab { flex:1; padding:12px; text-align:center; cursor:pointer; background:#f5f5f5; border:none; font-size:15px; font-weight:bold; color:#666; transition:all 0.2s; }
.bm-account-tab.active { background:#fff; color:#111; border:2px solid #ddd; border-bottom:2px solid #fff; margin-bottom:-2px; }
.bm-account-panel { display:none; }
.bm-account-panel.active { display:block; }

/* Chatbot (frontend.php) */
#bm-chatbot-toggle {
    position:fixed; bottom:20px; right:20px; width:60px; height:60px;
    background:#111; color:#fff; border:none; border-radius:50%;
    cursor:pointer; z-index:9999; box-shadow:0 4px 12px rgba(0,0,0,0.3);
    display:flex; align-items:center; justify-content:center; padding:0;
}
#bm-chatbot-box {
    position:fixed; bottom:90px; right:20px; width:350px; max-height:450px;
    background:#fff; border-radius:10px; box-shadow:0 4px 20px rgba(0,0,0,0.2);
    display:none; flex-direction:column; z-index:9998; overflow:hidden;
}
#bm-chatbot-header {
    background:#111; color:#fff; padding:12px 15px; font-weight:bold; font-size:14px;
}
#bm-chatbot-messages {
    flex:1; padding:10px; overflow-y:auto; max-height:300px; font-size:13px;
}
#bm-chatbot-messages .bm-msg-user { background:#e3f2fd; padding:8px 12px; border-radius:12px 12px 0 12px; margin:5px 0; text-align:right; }
#bm-chatbot-messages .bm-msg-bot { background:#f5f5f5; padding:8px 12px; border-radius:12px 12px 12px 0; margin:5px 0; }
#bm-chatbot-input-area { display:flex; padding:10px; border-top:1px solid #eee; }
#bm-chatbot-input { flex:1; padding:8px; border:1px solid #ddd; border-radius:20px; font-size:13px; }
#bm-chatbot-send { background:#111; color:#fff; border:none; border-radius:20px; padding:8px 15px; margin-left:5px; cursor:pointer; font-size:13px; }
@media (max-width:400px) { #bm-chatbot-box { width:90%; right:5%; } }

/* Librarian dashboard cards hover */
.bm-dash-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }

/* Labels print view */
@page { size: A4; margin: 1.2cm 0.3cm 0.2cm 0.3cm; }
.labels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.15cm; padding: 0; }
.label { border: 1px dashed #ccc; padding: 0.2cm 0.15cm; text-align: center; height: 2.4cm; display: flex; flex-direction: column; justify-content: center; page-break-inside: avoid; }
.label .author { font-weight: bold; font-size: 12px; text-transform: uppercase; margin-bottom: 2px; }
.label .title { font-size: 10px; margin-bottom: 3px; }
.label .cdu { font-weight: bold; font-size: 16px; margin-bottom: 2px; }
.label .cutter { font-weight: bold; font-size: 16px; margin-bottom: 2px; }
.label .info { font-size: 9px; color: #666; }
.label .barcode { font-size: 9px; letter-spacing: 2px; margin-top: 3px; }
@media print {
    .label { border: none; }
    body { margin: 0; padding: 0; }
}

/* Library card print view */
@media print {
    .card-wrapper { border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .card { -webkit-print-color-adjust: exact; print-color-adjust: exact; border: 2px solid #003d6b; }
}

/* Microphone pulse animation */
@keyframes bm-pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }