/* ============================================================
   WP Inventory POS — Frontend / Shortcode CSS
   Lightweight, theme-agnostic — works inside any WP theme.
   ============================================================ */

/* ── Notices ──────────────────────────────────────────────── */
.wpip-shortcode-notice {
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  margin: 16px 0;
}
.wpip-notice-error   { background: #FEE2E2; color: #991B1B; border-left: 4px solid #EF4444; }
.wpip-notice-warning { background: #FEF3C7; color: #92400E; border-left: 4px solid #F5A623; }
.wpip-notice-warning a { color: #1D4ED8; margin-left: 8px; }

/* ── Shared loading / empty ───────────────────────────────── */
.wpip-sc-loading {
  text-align: center;
  padding: 32px;
  color: #6B7280;
  font-size: 14px;
}
.wpip-sc-empty {
  text-align: center;
  padding: 32px;
  color: #9CA3AF;
  font-size: 14px;
}
.wpip-sc-btn {
  padding: 7px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.wpip-sc-btn:hover    { background: #F8FAFC; }
.wpip-sc-btn:disabled { opacity: .5; cursor: default; }

/* ── Products catalog ─────────────────────────────────────── */
.wpip-products-shortcode { margin: 24px 0; }
.wpip-cat-search-wrap    { margin-bottom: 16px; }
.wpip-cat-search {
  width: 100%;
  max-width: 360px;
  padding: 9px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.wpip-cat-search:focus { border-color: #3B82F6; }

.wpip-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.wpip-cat-grid-item {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  transition: box-shadow .15s;
}
.wpip-cat-grid-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.wpip-cat-img             { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; margin: 0 auto 10px; display: block; }
.wpip-cat-img-placeholder { font-size: 48px; line-height: 80px; margin: 0 auto 10px; }
.wpip-cat-name            { font-size: 13.5px; font-weight: 600; color: #111827; margin-bottom: 5px; }
.wpip-cat-price           { font-size: 15px; font-weight: 700; color: #3B82F6; }
.wpip-cat-stock           { font-size: 11.5px; color: #6B7280; margin-top: 4px; }
.wpip-stock-out           { color: #EF4444; font-weight: 600; }

.wpip-cat-list { display: flex; flex-direction: column; gap: 0; border: 1px solid #E2E8F0; border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.wpip-cat-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13.5px;
}
.wpip-cat-list-item:last-child { border-bottom: none; }
.wpip-cat-list-item .wpip-cat-name  { flex: 1; font-weight: 500; }
.wpip-cat-list-item .wpip-cat-sku   { color: #9CA3AF; font-size: 12px; font-family: monospace; min-width: 80px; }
.wpip-cat-list-item .wpip-cat-price { font-weight: 700; color: #3B82F6; min-width: 90px; text-align: right; }

.wpip-cat-pagination { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 16px; font-size: 13px; color: #6B7280; }

/* ── Order Lookup ─────────────────────────────────────────── */
.wpip-order-lookup-shortcode { margin: 24px 0; max-width: 480px; }
.wpip-order-lookup-form      { display: flex; gap: 8px; margin-bottom: 16px; }
.wpip-order-lookup-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.wpip-order-lookup-form input:focus { border-color: #3B82F6; }
.wpip-order-lookup-form button {
  padding: 10px 20px;
  background: #3B82F6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.wpip-lookup-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 18px 20px;
}
.wpip-lookup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 16px;
}
.wpip-lookup-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 6px 0;
  border-bottom: 1px solid #F1F5F9;
  color: #374151;
}
.wpip-lookup-row:last-child { border-bottom: none; }
.wpip-lookup-row span:first-child { color: #6B7280; }

/* ── Reports embed ────────────────────────────────────────── */
.wpip-reports-embed  { margin: 20px 0; }
.wpip-rep-grid       { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.wpip-rep-card       { background: #F8FAFC; border-radius: 10px; padding: 16px 18px; border: 1px solid #E2E8F0; }
.wpip-rep-label      { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #6B7280; margin-bottom: 6px; }
.wpip-rep-value      { font-size: 24px; font-weight: 700; color: #111827; }

/* ── Low stock notice ─────────────────────────────────────── */
.wpip-low-stock-notice       { margin: 20px 0; }
.wpip-low-stock-notice table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.wpip-low-stock-notice th    { padding: 8px 12px; background: #F8FAFC; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #6B7280; border-bottom: 2px solid #E2E8F0; }
.wpip-low-stock-notice td    { padding: 10px 12px; border-bottom: 1px solid #F1F5F9; color: #374151; }
.wpip-low-stock-notice tr:last-child td { border-bottom: none; }
.wpip-badge-danger  { display:inline-block;padding:2px 8px;border-radius:20px;font-size:11px;font-weight:600;background:#FEE2E2;color:#991B1B; }
.wpip-badge-warning { display:inline-block;padding:2px 8px;border-radius:20px;font-size:11px;font-weight:600;background:#FEF3C7;color:#92400E; }
