/* Blackberry Eatery Order Widget Styles */
#bb-order-root { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a1a; line-height: 1.5; }
#bb-order-root * { box-sizing: border-box; }

/* Layout */
.bb-layout { display: flex; gap: 24px; align-items: flex-start; }
.bb-menu-panel { flex: 1; min-width: 0; }
.bb-cart-panel { width: 320px; flex-shrink: 0; }
.bb-cart-sticky { position: sticky; top: 80px; }
@media (max-width: 768px) { .bb-layout { flex-direction: column; } .bb-cart-panel { width: 100%; order: -1; } .bb-cart-sticky { position: static; } }

/* Tabs */
.bb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; border-bottom: 2px solid #e5e7eb; padding-bottom: 8px; }
.bb-tab { background: none; border: 1px solid #d1d5db; border-radius: 20px; padding: 6px 14px; cursor: pointer; font-size: 13px; color: #4b5563; transition: all .2s; }
.bb-tab:hover { border-color: #5c1a0a; color: #5c1a0a; }
.bb-tab.active { background: #5c1a0a; color: #fff; border-color: #5c1a0a; }

/* Category */
.bb-category { display: none; }
.bb-category.active { display: block; }
.bb-cat-title { font-size: 20px; font-weight: 700; color: #3a1a0a; margin: 0 0 16px; padding-bottom: 8px; border-bottom: 2px solid #c8a87a; }

/* Item cards */
.bb-items { display: flex; flex-direction: column; gap: 10px; }
.bb-item-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; transition: box-shadow .2s; }
.bb-item-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.bb-item-info { flex: 1; min-width: 0; }
.bb-item-info h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: #1a1a1a; }
.bb-item-desc { margin: 0; font-size: 12px; color: #6b7280; line-height: 1.4; }
.bb-tag { display: inline-block; background: #f0fff4; color: #166534; font-size: 10px; padding: 1px 5px; border-radius: 4px; font-weight: 600; margin-left: 4px; vertical-align: middle; }
.bb-item-action { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.bb-price { font-size: 15px; font-weight: 700; color: #3a1a0a; white-space: nowrap; }
.bb-add-btn { background: #5c1a0a; color: #fff; border: none; border-radius: 20px; padding: 6px 14px; cursor: pointer; font-size: 13px; font-weight: 600; transition: background .2s; white-space: nowrap; }
.bb-add-btn:hover { background: #7c2a1a; }

/* Cart */
.bb-cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bb-cart-header h3 { margin: 0; font-size: 16px; font-weight: 700; }
.bb-cart-count { font-size: 12px; color: #6b7280; background: #f3f4f6; padding: 2px 8px; border-radius: 12px; }
.bb-cart-items { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; min-height: 80px; max-height: 400px; overflow-y: auto; }
.bb-empty { color: #9ca3af; font-size: 13px; text-align: center; margin: 16px 0; line-height: 1.6; }
.bb-cart-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.bb-cart-line:last-child { border-bottom: none; }
.bb-cart-line-info { flex: 1; min-width: 0; }
.bb-cart-name { display: block; font-size: 13px; font-weight: 600; }
.bb-cart-opts { display: block; font-size: 11px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-cart-line-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.bb-qty-btn { background: #f3f4f6; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.bb-qty-btn:hover { background: #e5e7eb; }
.bb-qty { font-size: 13px; font-weight: 700; min-width: 20px; text-align: center; }
.bb-line-price { font-size: 13px; font-weight: 600; color: #3a1a0a; white-space: nowrap; }
.bb-cart-footer { margin-top: 10px; }
.bb-totals { background: #f9fafb; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.bb-total-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }

/* Buttons */
.bb-btn { display: inline-block; padding: 12px 24px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all .2s; }
.bb-btn-primary { background: #5c1a0a; color: #fff; }
.bb-btn-primary:hover { background: #7c2a1a; }
.bb-btn-secondary { background: #f3f4f6; color: #374151; }
.bb-btn-secondary:hover { background: #e5e7eb; }
.bb-btn-full { width: 100%; text-align: center; }

/* Flash notification */
.bb-flash { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: #166534; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; opacity: 0; transition: all .3s; z-index: 9999; pointer-events: none; }
.bb-flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Loading */
.bb-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #6b7280; }
.bb-spinner { width: 36px; height: 36px; border: 3px solid #e5e7eb; border-top-color: #5c1a0a; border-radius: 50%; animation: bb-spin 0.8s linear infinite; margin-bottom: 12px; }
@keyframes bb-spin { to { transform: rotate(360deg); } }

/* Modals */
.bb-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 9998; padding: 16px; }
.bb-modal { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; position: relative; }
.bb-modal-lg { max-width: 680px; }
.bb-modal-close { position: absolute; top: 16px; right: 16px; background: #f3f4f6; border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.bb-modal-title { margin: 0 0 20px; font-size: 22px; font-weight: 700; }
.bb-modal-actions { display: flex; gap: 12px; margin-top: 20px; justify-content: flex-end; }

/* Customize modal */
.bb-option-group { margin-bottom: 18px; }
.bb-option-group h4 { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: #374151; }
.bb-required { display: inline-block; background: #fef3c7; color: #92400e; font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 600; }
.bb-opt-label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 6px; cursor: pointer; font-size: 13px; transition: border-color .2s; }
.bb-opt-label:hover { border-color: #5c1a0a; }
.bb-opt-label input { accent-color: #5c1a0a; }

/* Checkout form */
.bb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .bb-form-row { grid-template-columns: 1fr; } }
.bb-form-group { margin-bottom: 14px; }
.bb-form-group label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.bb-form-group input, .bb-form-group select, .bb-form-group textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 9px 12px; font-size: 14px; outline: none; transition: border-color .2s; }
.bb-form-group input:focus, .bb-form-group select:focus, .bb-form-group textarea:focus { border-color: #5c1a0a; }
.bb-radio-group { display: flex; gap: 16px; }
.bb-radio { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; font-weight: 500; }
.bb-radio input { accent-color: #5c1a0a; width: 16px; height: 16px; }
.bb-delivery-note { font-size: 12px; color: #6b7280; margin: 4px 0 0; }
.bb-stripe-wrap { border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px; margin: 14px 0; min-height: 60px; }
.bb-error-msg { color: #dc2626; font-size: 13px; padding: 8px 12px; background: #fef2f2; border-radius: 6px; margin-bottom: 12px; }
.bb-error { color: #dc2626; font-size: 14px; text-align: center; padding: 24px; }

/* Order summary in checkout */
.bb-order-summary { background: #f9fafb; border-radius: 10px; padding: 14px; margin-bottom: 16px; }
.bb-summary-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bb-summary-table td { padding: 4px 6px; }
.bb-summary-table td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.bb-sum-sub td { border-top: 1px solid #e5e7eb; padding-top: 8px; margin-top: 4px; }
.bb-sum-total td { border-top: 2px solid #d1d5db; padding-top: 8px; font-size: 15px; }

/* Success modal */
.bb-modal-success { text-align: center; }
.bb-success-icon { font-size: 64px; margin-bottom: 12px; }
.bb-modal-success h2 { font-size: 26px; color: #166534; margin: 0 0 12px; }
.bb-modal-success p { color: #4b5563; margin-bottom: 24px; }
