/* ── NU Scraper Public CSS ───────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600&family=Inter:wght@400;500;600;700&display=swap');

.nuns-public-wrap {
  font-family: 'Inter', 'Hind Siliguri', -apple-system, sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  color: #1a202c;
}

/* Header */
.nuns-pub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 0 16px;
  border-bottom: 3px solid #1d4ed8;
  margin-bottom: 20px;
}
.nuns-pub-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a202c;
  margin: 0;
}
.nuns-pub-count {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* Search */
.nuns-pub-search-wrap {
  margin-bottom: 16px;
}
.nuns-pub-search {
  width: 100%;
  max-width: 380px;
  padding: 10px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: .2s;
  box-sizing: border-box;
}
.nuns-pub-search:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* Table wrapper */
.nuns-pub-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* Table */
.nuns-pub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}
.nuns-pub-table thead tr {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}
.nuns-pub-table th {
  padding: 14px 18px;
  text-align: left;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.nuns-pub-table td {
  padding: 13px 18px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.nuns-pub-table tbody tr:last-child td {
  border-bottom: none;
}
.nuns-pub-table tbody tr:nth-child(even) {
  background: #fafbff;
}
.nuns-pub-table tbody tr:hover {
  background: #eff6ff;
  transition: background .15s;
}

/* Columns */
.nuns-th-no, .nuns-td-no {
  width: 50px;
  text-align: center;
  font-weight: 600;
  color: #6b7280;
}
.nuns-th-title, .nuns-td-title {
  min-width: 280px;
  line-height: 1.5;
  font-size: 14px;
  color: #1a202c;
  font-weight: 500;
}
.nuns-th-date, .nuns-td-date {
  width: 110px;
  white-space: nowrap;
  font-size: 13px;
  color: #374151;
}
.nuns-th-pdf, .nuns-td-pdf {
  width: 90px;
  text-align: center;
}

/* PDF button */
.nuns-pub-pdf-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: transform .2s;
}
.nuns-pub-pdf-btn:hover {
  transform: scale(1.08);
}
.nuns-pub-pdf-label {
  font-size: 11px;
  color: #ef4444;
  font-weight: 600;
}

/* Footer */
.nuns-pub-footer {
  text-align: right;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.nuns-pub-footer a {
  color: #3b82f6;
  text-decoration: none;
}

/* Empty */
.nuns-pub-empty {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-size: 15px;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 640px) {
  .nuns-pub-title { font-size: 18px; }
  .nuns-pub-table th, .nuns-pub-table td { padding: 10px 12px; }
  .nuns-th-title, .nuns-td-title { min-width: 180px; font-size: 13px; }
  .nuns-pub-table { font-size: 13px; }
  .nuns-pub-pdf-label { display: none; }
}
@media (max-width: 420px) {
  .nuns-pub-header { flex-direction: column; align-items: flex-start; }
  .nuns-th-no, .nuns-td-no { display: none; }
}

/* ── Breaking Notice ─────────────────────────── */
.nuns-breaking-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  height: 42px;
}
.nuns-breaking-label {
  background: #dc2626;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  letter-spacing: .5px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.nuns-breaking-ticker {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.nuns-breaking-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: nuns-marquee 30s linear infinite;
  font-size: 14px;
  color: #1a202c;
  padding: 0 20px;
  gap: 0;
}
.nuns-breaking-track:hover { animation-play-state: paused; }
.nuns-breaking-link { color: #1d4ed8; text-decoration: none; font-weight: 500; }
.nuns-breaking-link:hover { text-decoration: underline; }
@keyframes nuns-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── AJAX Pagination ─────────────────────────── */
.nuns-pub-pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: center;
}
.nuns-pub-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.nuns-pub-page-btn:hover { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.nuns-pub-page-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ── Admin Shortcoder ────────────────────────── */
.nuns-sc-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:20px; }
.nuns-sc-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:20px; box-shadow:0 1px 4px rgba(0,0,0,.06); display:flex; flex-direction:column; gap:12px; }
.nuns-sc-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.nuns-sc-name { font-size:17px; font-weight:700; color:#1a202c; margin:0 0 4px; }
.nuns-sc-desc { font-size:12px; color:#6b7280; margin:0 0 6px; }
.nuns-sc-card-actions { display:flex; gap:6px; flex-shrink:0; }
.nuns-icon-btn { background:none; border:1px solid #e5e7eb; border-radius:7px; padding:5px 8px; cursor:pointer; font-size:16px; transition:.2s; }
.nuns-icon-btn:hover { background:#f9fafb; }
.nuns-sc-codes { background:#f8fafc; border-radius:8px; padding:10px 12px; display:flex; flex-direction:column; gap:6px; }
.nuns-sc-code-row { display:flex; align-items:center; gap:8px; }
.nuns-sc-code-row code { flex:1; font-size:12px; background:#fff; border:1px solid #e2e8f0; border-radius:5px; padding:4px 8px; color:#0f172a; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nuns-sc-card-foot { margin-top:auto; }

/* Shortcoder edit layout */
.nuns-sc-edit-layout { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.nuns-card-header { padding:16px 20px; border-bottom:1px solid #f1f5f9; display:flex; align-items:center; justify-content:space-between; }
.nuns-card-header h3 { margin:0; font-size:15px; font-weight:600; color:#1a202c; }
.nuns-row-in-sc { background:#f0fdf4!important; }

/* Breaking admin */
.nuns-brk-item { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid #f1f5f9; }
.nuns-brk-item-drag { color:#9ca3af; cursor:grab; font-size:18px; }
.nuns-brk-item-fields { flex:1; display:flex; flex-direction:column; gap:6px; }
.nuns-brk-text { font-weight:500; }

/* Modal */
.nuns-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:99999; display:flex; align-items:center; justify-content:center; }
.nuns-modal { background:#fff; border-radius:14px; padding:0; width:480px; max-width:95vw; box-shadow:0 20px 60px rgba(0,0,0,.2); }
.nuns-modal-header { display:flex; justify-content:space-between; align-items:center; padding:20px 24px; border-bottom:1px solid #f1f5f9; }
.nuns-modal-header h2 { margin:0; font-size:18px; color:#1a202c; }
.nuns-modal-close { background:none; border:none; font-size:20px; cursor:pointer; color:#6b7280; }
.nuns-modal-body { padding:20px 24px; display:flex; flex-direction:column; gap:14px; }
.nuns-modal-footer { padding:16px 24px; border-top:1px solid #f1f5f9; display:flex; justify-content:flex-end; gap:10px; }
.nuns-form-group { display:flex; flex-direction:column; gap:6px; }
.nuns-form-group label { font-size:13px; font-weight:600; color:#374151; }
.nuns-input { border:1px solid #d1d5db; border-radius:8px; padding:9px 12px; font-size:14px; width:100%; box-sizing:border-box; }
.nuns-input:focus { outline:none; border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.15); }
.nuns-textarea { border:1px solid #d1d5db; border-radius:8px; padding:9px 12px; font-size:14px; width:100%; resize:vertical; box-sizing:border-box; }

@media(max-width:768px){
  .nuns-sc-edit-layout { grid-template-columns:1fr; }
  .nuns-sc-grid { grid-template-columns:1fr; }
}

/* ── Smart Pagination ──────────────────────────── */
.nuns-pub-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 20px;
    justify-content: center;
}
.nuns-pub-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    line-height: 1;
}
.nuns-pub-page-btn:hover { background:#eff6ff; border-color:#93c5fd; color:#1d4ed8; }
.nuns-pub-page-btn.active { background:#2563eb; color:#fff; border-color:#2563eb; cursor:default; }
.nuns-page-nav {
    padding: 0 16px;
    height: 38px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}
.nuns-page-nav:hover:not(:disabled) { background:#eff6ff; border-color:#93c5fd; color:#1d4ed8; }
.nuns-page-nav:disabled { opacity:.4; cursor:not-allowed; }
.nuns-page-ellipsis { color:#9ca3af; font-size:16px; padding:0 4px; user-select:none; }
