/* ═══════════════════════════════════════
   Brahmins Info Page — bip-style.css
   Light, clean, saffron-accented theme
═══════════════════════════════════════ */

:root {
  --bip-saffron:   #e8660a;
  --bip-gold:      #c9820a;
  --bip-cream:     #fdf8f2;
  --bip-white:     #ffffff;
  --bip-border:    #e0d5c8;
  --bip-text:      #2c2c2c;
  --bip-muted:     #777;
  --bip-success:   #1a7a3c;
  --bip-error:     #c0392b;
  --bip-shadow:    0 2px 10px rgba(0,0,0,0.10);
  --bip-radius:    8px;
}

#bip-wrap * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Arial, sans-serif; }

#bip-wrap {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bip-cream);
  border: 1px solid var(--bip-border);
  border-radius: var(--bip-radius);
  overflow: hidden;
}

/* ── Top Bar ── */
#bip-top-bar {
  background: linear-gradient(135deg, #fff8f0 0%, #fff3e5 100%);
  border-bottom: 2px solid var(--bip-saffron);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#bip-top-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--bip-saffron);
  flex: 0 0 auto;
  margin-right: 10px;
}

.bip-om { font-size: 22px; }

#bip-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.bip-cat-tab {
  padding: 6px 14px;
  border: 1px solid var(--bip-border);
  background: var(--bip-white);
  color: var(--bip-text);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all .2s;
}
.bip-cat-tab:hover, .bip-cat-tab.active {
  background: var(--bip-saffron);
  color: #fff;
  border-color: var(--bip-saffron);
}

#bip-add-btn {
  padding: 8px 18px;
  background: var(--bip-saffron);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
#bip-add-btn:hover { background: var(--bip-gold); }

/* ── Layout ── */
#bip-layout {
  display: flex;
  min-height: 500px;
}

/* ── Left Panel ── */
#bip-left-panel {
  width: 190px;
  flex: 0 0 190px;
  background: var(--bip-white);
  border-right: 1px solid var(--bip-border);
  padding: 14px 0;
}

.bip-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--bip-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--bip-border);
  margin-bottom: 8px;
}

#bip-cat-list { list-style: none; }

.bip-cat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background .15s;
  border-left: 3px solid transparent;
}
.bip-cat-item:hover { background: #fff8f0; }
.bip-cat-item.active {
  background: #fff3e5;
  border-left-color: var(--bip-saffron);
}

.bip-cat-name { flex: 1; font-size: 13px; color: var(--bip-text); }
.bip-cat-count {
  background: var(--bip-saffron);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}
.bip-cat-icon { font-size: 14px; }

/* ── Main Grid ── */
#bip-main {
  flex: 1;
  padding: 16px;
  background: var(--bip-cream);
}

#bip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* ── Post Cards ── */
.bip-card {
  background: var(--bip-white);
  border: 1px solid var(--bip-border);
  border-radius: var(--bip-radius);
  overflow: hidden;
  box-shadow: var(--bip-shadow);
  transition: transform .2s, box-shadow .2s;
}
.bip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.13);
}

.bip-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(90deg, #fff8f0, #fff);
  border-bottom: 1px solid var(--bip-border);
}

.bip-card-serial {
  font-size: 11px;
  color: var(--bip-muted);
  font-weight: 600;
}

.bip-card-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.bip-badge-wanted    { background: #fde8e8; color: #c0392b; }
.bip-badge-available { background: #e8f8ec; color: #1a7a3c; }
.bip-badge-information { background: #e8f0fd; color: #1a52c0; }
.bip-badge-news      { background: #fef3e8; color: #c07a1a; }

.bip-card-body { padding: 12px; }

.bip-card-subject {
  font-size: 15px;
  font-weight: 700;
  color: var(--bip-text);
  margin-bottom: 7px;
  word-break: break-word;
  line-height: 1.35;
}

/* Image post thumbnail */
.bip-card-img-wrap {
  position: relative;
  cursor: zoom-in;
  margin-bottom: 8px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--bip-border);
}
.bip-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.bip-card-img-wrap:hover .bip-card-img { transform: scale(1.04); }
.bip-img-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 12px;
  text-align: center;
  padding: 5px;
  opacity: 0;
  transition: opacity .2s;
}
.bip-card-img-wrap:hover .bip-img-overlay { opacity: 1; }

/* Text content */
.bip-card-content {
  font-size: 13px;
  color: #444;
  font-style: italic;
  font-weight: 600;
  line-height: 1.6;
  word-break: break-word;
}
.bip-content-short { display: block; }
.bip-content-full  { display: none; }
.bip-show-more {
  color: var(--bip-saffron);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-style: normal;
  display: inline-block;
  margin-top: 4px;
}
.bip-show-more:hover { text-decoration: underline; }

/* Card footer */
.bip-card-footer {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--bip-border);
  background: #fafafa;
  flex-wrap: wrap;
}

.bip-btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid var(--bip-border);
  background: var(--bip-white);
  border-radius: 5px;
  cursor: pointer;
  transition: background .15s;
  color: var(--bip-text);
}
.bip-btn-sm:hover { background: #f0e8de; }
.bip-btn-share    { color: var(--bip-saffron); border-color: var(--bip-saffron); }
.bip-btn-download { color: var(--bip-success); border-color: var(--bip-success); }
.bip-btn-zoom     { color: #666; }

.bip-card-date { font-size: 10px; color: var(--bip-muted); margin-left: auto; align-self: center; }

/* ── No posts ── */
#bip-no-posts {
  text-align: center;
  padding: 60px 20px;
  color: var(--bip-muted);
  font-size: 15px;
}

/* ── MODAL ── */
#bip-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#bip-modal {
  background: var(--bip-white);
  border-radius: 10px;
  width: 95%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
}

#bip-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(90deg, #fff8f0, #fff3e5);
  border-bottom: 2px solid var(--bip-saffron);
  font-weight: 700;
  font-size: 16px;
  color: var(--bip-saffron);
}

#bip-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888;
  line-height: 1;
}
#bip-modal-close:hover { color: var(--bip-error); }

#bip-step-lock, #bip-step-form { padding: 20px 18px; }

#bip-step-lock p { margin-bottom: 12px; font-size: 14px; color: var(--bip-text); }
#bip-lock-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--bip-border);
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 10px;
}
#bip-lock-btn {
  padding: 9px 22px;
  background: var(--bip-saffron);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
#bip-lock-btn:hover { background: var(--bip-gold); }

.bip-form-row { margin-bottom: 14px; }
.bip-form-row label { display: block; font-size: 12px; font-weight: 700; color: var(--bip-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; }

.bip-form-row select,
.bip-form-row input[type="text"],
.bip-form-row textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--bip-border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--bip-text);
  background: var(--bip-white);
  resize: vertical;
}

#bip-type-toggle { display: flex; gap: 8px; }
.bip-type-btn {
  flex: 1;
  padding: 9px;
  border: 2px solid var(--bip-border);
  background: var(--bip-white);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all .2s;
}
.bip-type-btn.active {
  background: #fff3e5;
  border-color: var(--bip-saffron);
  color: var(--bip-saffron);
}

#bip-drop-zone {
  border: 2px dashed var(--bip-border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s;
}
#bip-drop-zone:hover, #bip-drop-zone.drag-over { border-color: var(--bip-saffron); background: #fff8f0; }
#bip-drop-zone input[type="file"] { display: none; }
#bip-drop-label { color: var(--bip-muted); font-size: 14px; }
#bip-img-preview { max-width: 100%; max-height: 180px; border-radius: 5px; margin-top: 10px; }

#bip-submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--bip-saffron);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
#bip-submit-btn:hover { background: var(--bip-gold); }

.bip-err     { color: var(--bip-error); font-size: 12px; margin-top: 6px; }
.bip-success { color: var(--bip-success); font-size: 13px; font-weight: 600; margin-top: 8px; }

/* ── Lightbox ── */
#bip-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#bip-lightbox-inner {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  text-align: center;
}

#bip-lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 6px;
  box-shadow: 0 0 40px rgba(255,255,255,.15);
}

#bip-lb-close {
  position: absolute;
  top: -36px; right: -2px;
  background: rgba(255,255,255,.2);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px; height: 30px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
#bip-lb-close:hover { background: rgba(255,255,255,.35); }

#bip-lb-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

#bip-lb-actions a, #bip-lb-actions button {
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
}
#bip-lb-download { background: #1a7a3c; color: #fff; }
#bip-lb-share    { background: var(--bip-saffron); color: #fff; }

/* ── Loading ── */
#bip-loading {
  text-align: center;
  padding: 30px;
  color: var(--bip-muted);
  font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  #bip-layout { flex-direction: column; }
  #bip-left-panel { width: 100%; flex: none; border-right: none; border-bottom: 1px solid var(--bip-border); padding: 10px 0; }
  #bip-cat-list { display: flex; flex-wrap: wrap; padding: 0 10px; gap: 6px; }
  .bip-cat-item { padding: 5px 10px; border-radius: 20px; border-left: none !important; }
  .bip-cat-item.active { background: #fff3e5; }
  #bip-grid { grid-template-columns: 1fr; }
  #bip-top-bar { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════
   ADDITIONS v1.1
══════════════════════════════ */

/* Top right buttons */
#bip-top-right { display:flex; gap:8px; align-items:center; }
#bip-admin-btn {
  padding: 7px 14px; background: #555; color:#fff;
  border:none; border-radius:6px; font-size:13px; font-weight:600; cursor:pointer; transition:background .2s;
}
#bip-admin-btn:hover { background:#333; }

/* ── Admin strip on cards ── */
.bip-admin-strip {
  display:flex; gap:8px; padding:6px 12px;
  background:#fff8f0; border-bottom:1px solid var(--bip-border);
}
.bip-edit-btn {
  padding:4px 12px; background:#e67e22; color:#fff;
  border:none; border-radius:4px; font-size:12px; font-weight:700; cursor:pointer;
}
.bip-edit-btn:hover { background:#cf6d17; }
.bip-delete-btn {
  padding:4px 12px; background:#e74c3c; color:#fff;
  border:none; border-radius:4px; font-size:12px; font-weight:700; cursor:pointer;
}
.bip-delete-btn:hover { background:#c0392b; }

/* ── Clickable card hint ── */
.bip-card-clickable { cursor:pointer; }
.bip-card-clickable .bip-card-body:hover { background:#fafafa; }
.bip-clickable-hint { cursor:pointer; }
.bip-read-more { color:var(--bip-saffron); font-size:12px; font-style:normal; cursor:pointer; }
.bip-read-more:hover { text-decoration:underline; }

/* ── Text Detail Popup ── */
#bip-detail-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.6);
  z-index:999998; display:flex; align-items:center; justify-content:center;
}
#bip-detail-box {
  background:#fff; border-radius:10px; width:95%; max-width:640px;
  max-height:90vh; display:flex; flex-direction:column;
  box-shadow:0 12px 40px rgba(0,0,0,.3);
  overflow:hidden;
}
#bip-detail-header {
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 18px; background:linear-gradient(90deg,#fff8f0,#fff3e5);
  border-bottom:2px solid var(--bip-saffron); flex-shrink:0;
}
#bip-detail-meta { display:flex; align-items:center; gap:8px; }
#bip-detail-close {
  padding:6px 14px; background:var(--bip-saffron); color:#fff;
  border:none; border-radius:6px; font-size:13px; font-weight:700; cursor:pointer;
}
#bip-detail-close:hover { background:var(--bip-gold); }
#bip-detail-body {
  flex:1; overflow-y:auto; padding:20px 22px;
}
#bip-detail-subject {
  font-size:20px; font-weight:800; color:var(--bip-text);
  margin-bottom:14px; line-height:1.3; word-break:break-word;
}
#bip-detail-content {
  font-size:14px; line-height:1.75; color:#333;
  white-space:pre-wrap; word-break:break-word;
  font-style:italic; font-weight:600;
}
#bip-detail-footer {
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  padding:10px 18px; border-top:1px solid var(--bip-border);
  background:#fafafa; flex-shrink:0;
}
#bip-detail-date { font-size:11px; color:var(--bip-muted); flex:1; }

/* ── Admin Login Modal ── */
#bip-admin-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.5);
  z-index:999997; display:flex; align-items:center; justify-content:center;
}
#bip-admin-modal {
  background:#fff; border-radius:10px; width:92%; max-width:360px;
  box-shadow:0 8px 30px rgba(0,0,0,.2);
}
#bip-admin-header {
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 18px; background:linear-gradient(90deg,#fff8f0,#fff3e5);
  border-bottom:2px solid var(--bip-saffron);
  font-weight:700; color:var(--bip-saffron);
}
#bip-admin-header button {
  background:none; border:none; font-size:18px; cursor:pointer; color:#888;
}
#bip-admin-body {
  padding:20px 18px; display:flex; flex-direction:column; gap:10px;
}
#bip-admin-pwd {
  width:100%; padding:9px 12px;
  border:1px solid var(--bip-border); border-radius:6px; font-size:14px;
}
#bip-admin-login-btn {
  padding:9px; background:var(--bip-saffron); color:#fff;
  border:none; border-radius:6px; font-weight:700; cursor:pointer;
}
#bip-admin-login-btn:hover { background:var(--bip-gold); }
#bip-admin-logout-btn {
  padding:9px; border:none; border-radius:6px; font-weight:700; cursor:pointer; color:#fff;
}

/* ── Browse button in drop zone ── */
#bip-drop-zone { border:2px dashed var(--bip-border); border-radius:8px; padding:20px; text-align:center; transition:border-color .2s; }
#bip-drop-zone.drag-over { border-color:var(--bip-saffron); background:#fff8f0; }
#bip-drop-inner { display:flex; flex-direction:column; align-items:center; gap:6px; }
.bip-drop-icon { font-size:28px; }
.bip-drop-text { color:var(--bip-muted); font-size:13px; }
.bip-drop-or   { color:#bbb; font-size:12px; }
#bip-browse-btn {
  padding:8px 20px; background:var(--bip-saffron); color:#fff;
  border:none; border-radius:6px; font-size:13px; font-weight:700;
  cursor:pointer; margin-top:4px; transition:background .2s;
}
#bip-browse-btn:hover { background:var(--bip-gold); }

/* ── Loading ── */
.bip-loading { text-align:center; padding:30px; color:var(--bip-muted); font-size:14px; }

/* ── Muted helper ── */
.bip-muted { color:var(--bip-muted); }

/* ── Toast ── */
.bip-toast {
  position:fixed; bottom:30px; left:50%; transform:translateX(-50%) translateY(20px);
  background:#333; color:#fff; padding:10px 22px; border-radius:25px;
  font-size:14px; z-index:9999999; opacity:0; transition:all .3s;
  pointer-events:none;
}
.bip-toast-show { opacity:1; transform:translateX(-50%) translateY(0); }

