/**
 * Bajrabarahi Books — Book Request Styles
 * assets/css/bb-book-request.css
 */

:root {
  --bb-req-crimson: #601320;
  --bb-req-crimson-dark: #460c16;
  --bb-req-gold: #C8963E;
  --bb-req-gold-light: #F4E8D1;
  --bb-req-ivory: #FAF6F0;
  --bb-req-border: #EADFD5;
  --bb-req-text: #2B2425;
  --bb-req-muted: #6B5E5F;
  --bb-req-radius: 8px;
}

.bb-book-request-page-wrapper {
  max-width: 1000px;
  margin: 0 auto 60px auto;
  font-family: var(--bb-font-sans, "Inter", -apple-system, sans-serif);
  color: var(--bb-req-text);
}

/* HERO BANNER */
.bb-request-hero {
  background: linear-gradient(135deg, #2b080e 0%, #601320 100%);
  border-radius: var(--bb-req-radius);
  padding: 45px 35px;
  color: #ffffff;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(96, 19, 32, 0.15);
  border: 1px solid rgba(200, 150, 62, 0.3);
}

.bb-request-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(200, 150, 62, 0.2), transparent 70%);
  pointer-events: none;
}

.bb-request-hero__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bb-req-gold);
  margin-bottom: 10px;
}

.bb-request-hero__title {
  font-family: var(--bb-font-serif, "Playfair Display", Georgia, serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 14px 0;
  line-height: 1.2;
}

.bb-request-hero__desc {
  font-size: 15px;
  line-height: 1.6;
  color: #e8d7c8;
  max-width: 700px;
  margin: 0 auto;
}

/* MODE TABS (Submit / Track) */
.bb-request-mode-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 25px;
}

.bb-mode-tab {
  background: #ffffff;
  border: 1.5px solid var(--bb-req-border);
  border-radius: 30px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--bb-req-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bb-mode-tab:hover {
  border-color: var(--bb-req-gold);
  color: var(--bb-req-crimson);
}

.bb-mode-tab.is-active {
  background: var(--bb-req-crimson);
  border-color: var(--bb-req-crimson);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(96, 19, 32, 0.2);
}

.bb-tab-content {
  display: none;
}

.bb-tab-content.is-active {
  display: block;
}

/* SMART CATALOG SEARCH CARD */
.bb-catalog-search-card {
  background: #ffffff;
  border: 1px solid var(--bb-req-border);
  border-radius: var(--bb-req-radius);
  padding: 28px;
  margin-bottom: 25px;
  box-shadow: 0 4px 18px rgba(43, 36, 37, 0.04);
}

.bb-smart-search-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.bb-smart-search-icon {
  font-size: 28px;
  line-height: 1;
}

.bb-smart-search-title {
  font-family: var(--bb-font-serif, "Playfair Display", Georgia, serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--bb-req-crimson);
  margin: 0 0 4px 0;
}

.bb-smart-search-subtitle {
  font-size: 13.5px;
  color: var(--bb-req-muted);
  margin: 0;
  line-height: 1.5;
}

.bb-smart-search-input-wrap {
  position: relative;
  width: 100%;
}

.bb-input-search {
  width: 100%;
  padding: 14px 44px 14px 18px !important;
  font-size: 16px !important;
  border: 2px solid var(--bb-req-border) !important;
  border-radius: 6px !important;
  background: #fdfaf6 !important;
  box-sizing: border-box !important;
  transition: all 0.25s ease !important;
  font-family: inherit !important;
}

.bb-input-search:focus {
  border-color: var(--bb-req-gold) !important;
  background: #ffffff !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(200, 150, 62, 0.15) !important;
}

/* LIVE SEARCH RESULTS DISPLAY */
.bb-smart-search-results {
  margin-top: 20px;
  border-top: 1px solid var(--bb-req-border);
  padding-top: 20px;
}

.bb-search-found-banner {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.bb-search-found-heading {
  color: #166534;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bb-search-found-sub {
  font-size: 13.5px;
  color: #15803d;
  margin: 0;
}

.bb-search-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 15px;
}

.bb-search-product-card {
  background: #ffffff;
  border: 1px solid var(--bb-req-border);
  border-radius: 6px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bb-search-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(43, 36, 37, 0.08);
}

.bb-search-prod-thumb {
  width: 55px;
  height: 80px;
  object-fit: cover;
  border-radius: 3px 6px 6px 3px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.bb-search-prod-info {
  flex: 1;
  min-width: 0;
}

.bb-search-prod-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--bb-req-crimson);
  margin: 0 0 3px 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-search-prod-author {
  font-size: 11.5px;
  color: var(--bb-req-muted);
  margin: 0 0 6px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bb-search-prod-stock {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.bb-search-prod-stock.is-in-stock { color: #166534; }
.bb-search-prod-stock.is-out-of-stock { color: #b91c1c; }

.bb-btn-view-product {
  display: inline-block;
  background: var(--bb-req-crimson);
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 3px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* BOOK NOT FOUND BANNER */
.bb-search-not-found-card {
  background: #fdfaf6;
  border: 1.5px dashed var(--bb-req-gold);
  border-radius: 6px;
  padding: 22px 24px;
  text-align: center;
}

.bb-not-found-title {
  font-family: var(--bb-font-serif, "Playfair Display", Georgia, serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--bb-req-crimson);
  margin: 0 0 6px 0;
}

.bb-not-found-desc {
  font-size: 14px;
  color: var(--bb-req-muted);
  margin: 0 0 16px 0;
}

.bb-btn-open-request-form {
  display: inline-block;
  background: var(--bb-req-crimson);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 10px 22px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.bb-btn-open-request-form:hover {
  background: var(--bb-req-crimson-dark);
}

/* COMPLETE REQUEST FORM CARD */
.bb-request-form-card {
  background: #ffffff;
  border: 1px solid var(--bb-req-border);
  border-radius: var(--bb-req-radius);
  padding: 35px 32px;
  box-shadow: 0 4px 20px rgba(43, 36, 37, 0.05);
}

.bb-form-section-title {
  font-family: var(--bb-font-serif, "Playfair Display", Georgia, serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--bb-req-crimson);
  margin: 0 0 6px 0;
}

.bb-form-section-subtitle {
  font-size: 13.5px;
  color: var(--bb-req-muted);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.bb-form-fieldset {
  margin-bottom: 24px;
}

.bb-fieldset-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--bb-req-border);
  padding-bottom: 8px;
}

.bb-fieldset-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--bb-req-gold);
  color: #ffffff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.bb-fieldset-title {
  font-family: var(--bb-font-serif, Georgia, serif);
  font-size: 18px;
  color: var(--bb-req-crimson);
  margin: 0;
}

.bb-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.bb-form-col.bb-col-full { grid-column: span 2; }
.bb-form-col.bb-col-half { grid-column: span 1; }

.bb-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--bb-req-text);
  margin-bottom: 6px;
}

.bb-required { color: #d32f2f; }

.bb-form-input,
.bb-form-textarea {
  width: 100% !important;
  padding: 11px 14px !important;
  font-size: 14px !important;
  border: 1.5px solid var(--bb-req-border) !important;
  border-radius: 4px !important;
  background: #fdfaf6 !important;
  color: var(--bb-req-text) !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  transition: all 0.2s ease !important;
}

.bb-form-input:focus,
.bb-form-textarea:focus {
  border-color: var(--bb-req-gold) !important;
  background: #ffffff !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(200, 150, 62, 0.12) !important;
}

.bb-toggle-extra-fields-btn {
  background: transparent;
  border: 1px dashed var(--bb-req-gold);
  border-radius: 4px;
  color: var(--bb-req-crimson);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.bb-toggle-extra-fields-btn:hover {
  background: #fdfaf6;
  border-color: var(--bb-req-crimson);
}

.bb-form-submit-section {
  margin-top: 30px;
  text-align: center;
  border-top: 1px solid var(--bb-req-border);
  padding-top: 25px;
}

.bb-btn-submit-request {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bb-req-crimson);
  color: #ffffff !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 34px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(96, 19, 32, 0.2);
  transition: all 0.25s ease;
}

.bb-btn-submit-request:hover {
  background: var(--bb-req-crimson-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(96, 19, 32, 0.28);
}

.bb-privacy-notice {
  font-size: 12px;
  color: var(--bb-req-muted);
  margin-top: 14px;
}

.bb-form-alert {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 20px;
  text-align: left;
}

.bb-form-alert.is-error {
  background: #ffebee;
  border-left: 4px solid #c62828;
  color: #b71c1c;
}

.bb-form-alert.is-success {
  background: #e8f5e9;
  border-left: 4px solid #2e7d32;
  color: #1b5e20;
}

/* SUCCESS SCREEN */
.bb-request-success-card {
  background: #ffffff;
  border: 1px solid var(--bb-req-border);
  border-radius: var(--bb-req-radius);
  padding: 45px 30px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(43, 36, 37, 0.06);
}

.bb-success-icon-wrap {
  width: 64px;
  height: 64px;
  background: #e8f5e9;
  border: 2px solid #a5d6a7;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.bb-success-check {
  font-size: 32px;
  color: #2e7d32;
  font-weight: 700;
  line-height: 1;
}

.bb-success-title {
  font-family: var(--bb-font-serif, "Playfair Display", Georgia, serif);
  font-size: 26px;
  color: var(--bb-req-crimson);
  margin: 0 0 6px 0;
}

.bb-success-lead {
  font-size: 15px;
  color: var(--bb-req-muted);
  margin: 0 0 24px 0;
}

.bb-success-details-card {
  max-width: 480px;
  margin: 0 auto 24px auto;
  background: #fdfaf6;
  border: 1px solid var(--bb-req-border);
  border-radius: 6px;
  padding: 18px 22px;
  text-align: left;
}

.bb-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0e6dc;
  font-size: 14px;
}

.bb-detail-row:last-child { border-bottom: none; }

.bb-detail-label { color: var(--bb-req-muted); }
.bb-detail-value { font-weight: 700; color: var(--bb-req-text); }
.bb-success-number { color: var(--bb-req-crimson); font-family: monospace; font-size: 15px; }

.bb-status-badge {
  display: inline-block;
  background: var(--bb-req-gold);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bb-success-note {
  font-size: 13.5px;
  color: var(--bb-req-muted);
  max-width: 520px;
  margin: 0 auto 24px auto;
  line-height: 1.5;
}

.bb-success-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.bb-btn-success-primary {
  background: var(--bb-req-crimson);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
}

.bb-btn-success-secondary {
  background: transparent;
  border: 1.5px solid var(--bb-req-crimson);
  color: var(--bb-req-crimson) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
}

/* GUEST TRACKING CARD */
.bb-track-card {
  background: #ffffff;
  border: 1px solid var(--bb-req-border);
  border-radius: var(--bb-req-radius);
  padding: 35px 30px;
  max-width: 600px;
  margin: 0 auto;
}

.bb-track-title {
  font-family: var(--bb-font-serif, "Playfair Display", Georgia, serif);
  font-size: 22px;
  color: var(--bb-req-crimson);
  text-align: center;
  margin: 0 0 6px 0;
}

.bb-track-subtitle {
  font-size: 13.5px;
  color: var(--bb-req-muted);
  text-align: center;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

/* GLOBAL MODAL STYLES */
.bb-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(18, 12, 14, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.bb-modal-dialog {
  background: #FAF6F0;
  border-radius: 10px;
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--bb-req-border);
}

.bb-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: rgba(0,0,0,0.06);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--bb-req-text);
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.bb-modal-close:hover {
  background: var(--bb-req-crimson);
  color: #ffffff;
}

.bb-modal-body {
  padding: 24px;
}

/* MOBILE RESPONSIVE ADJUSTMENTS */
@media (max-width: 767px) {
  .bb-request-hero { padding: 30px 18px; }
  .bb-form-grid { grid-template-columns: 1fr; }
  .bb-form-col.bb-col-full,
  .bb-form-col.bb-col-half { grid-column: span 1; }
  .bb-request-form-card,
  .bb-catalog-search-card,
  .bb-track-card { padding: 22px 18px; }
  .bb-modal-body { padding: 14px; }
}
