/* ── OPA Member Management – Public Shortcode CSS ───────────────────────── */

.opa-pub-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1e293b; }

/* Toolbar */
.opa-pub-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.opa-pub-search-wrap { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.opa-pub-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #94a3b8; pointer-events: none; }
#opa-pub-search { width: 100%; padding: 9px 12px 9px 34px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; color: #1e293b; outline: none; transition: border-color .2s, box-shadow .2s; background: #f8fafc; }
#opa-pub-search:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.15); background: #fff; }
.opa-pub-count { font-size: 13px; color: #64748b; white-space: nowrap; }
.opa-pub-count span { font-weight: 700; color: #1e3a8a; }

/* Table wrapper */
.opa-pub-table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); background: #fff; }

/* Table */
.opa-pub-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 820px; }
.opa-pub-table thead tr { background: #f8fafc; }
.opa-pub-table th { padding: 11px 14px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.opa-pub-table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.opa-pub-table tbody tr:last-child td { border-bottom: none; }
.opa-pub-table tbody tr:hover { background: #f8fafc; }
.opa-pub-table code { font-family: monospace; font-size: 12px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; padding: 2px 6px; color: #374151; }
.opa-pub-empty { text-align: center; padding: 48px; color: #94a3b8; font-size: 15px; }

/* ID */
.opa-pub-id { font-family: monospace; font-weight: 700; font-size: 13px; color: #1e3a8a; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 5px; padding: 2px 7px; }

/* Name */
.opa-pub-name { font-weight: 600; color: #0f172a; }

/* Photo */
.opa-pub-thumb { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #e2e8f0; display: block; }
.opa-pub-no-photo { font-size: 30px; display: block; text-align: center; }

/* Category badges */
.opa-pub-cat { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.opa-cat-lm       { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.opa-cat-wife     { background: #fdf2f8; color: #9d174d; border: 1px solid #fbcfe8; }
.opa-cat-son      { background: #f0fdf4; color: #14532d; border: 1px solid #bbf7d0; }
.opa-cat-daughter { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.opa-cat-other    { background: #f9fafb; color: #374151; border: 1px solid #e5e7eb; }

/* Action buttons */
.opa-pub-actions { white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.opa-pub-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid transparent; text-decoration: none !important; line-height: 1.4; transition: all .15s; }
.opa-pub-view-btn { background: #eff6ff; color: #1e3a8a; border-color: #bfdbfe; }
.opa-pub-view-btn:hover { background: #dbeafe; border-color: #93c5fd; }
.opa-pub-print-btn { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.opa-pub-print-btn:hover { background: #dcfce7; border-color: #86efac; color: #15803d; }

/* ── View Modal ─────────────────────────────────────────────────────────── */
.opa-pub-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.opa-pub-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.opa-pub-modal-box { position: relative; background: #fff; border-radius: 14px; width: 460px; max-width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 60px rgba(0,0,0,.3); padding: 28px 24px 24px; }
.opa-pub-modal-close { position: absolute; top: 14px; right: 16px; background: #f1f5f9; border: none; cursor: pointer; font-size: 20px; color: #64748b; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1; transition: background .15s; }
.opa-pub-modal-close:hover { background: #e2e8f0; color: #0f172a; }

/* Modal content */
.opa-pub-view-header { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #f1f5f9; }
.opa-pub-view-avatar { width: 80px; height: 80px; border-radius: 12px; border: 2px solid #e2e8f0; object-fit: cover; flex-shrink: 0; }
.opa-pub-view-avatar-ph { width: 80px; height: 80px; border-radius: 12px; background: #f1f5f9; border: 2px solid #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 40px; flex-shrink: 0; }
.opa-pub-view-name { font-size: 18px; font-weight: 700; color: #0f172a; line-height: 1.3; }
.opa-pub-view-id { font-family: monospace; font-size: 13px; color: #64748b; margin-top: 3px; }
.opa-pub-view-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opa-pub-view-field { border: 1px solid #f1f5f9; background: #f8fafc; border-radius: 8px; padding: 10px 12px; }
.opa-pub-view-field .lbl { font-size: 10px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.opa-pub-view-field .val { font-size: 14px; font-weight: 600; color: #1e293b; }
.opa-pub-view-field.full { grid-column: 1 / -1; }
.opa-pub-view-footer { margin-top: 18px; display: flex; justify-content: flex-end; }
.opa-pub-view-print { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; background: #1e3a8a; color: #fff; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none !important; transition: background .2s; }
.opa-pub-view-print:hover { background: #1e40af; color: #fff; }

/* ── Pagination footer ─────────────────────────────────────────────────── */
.opa-pub-footer { padding: 10px 16px; font-size: 13px; color: #64748b; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.opa-pub-pagination { display: flex; align-items: center; gap: 3px; }
.opa-pub-page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #374151; text-decoration: none !important; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; line-height: 1; }
.opa-pub-page-btn:hover { border-color: #1e3a8a; color: #1e3a8a; background: #eff6ff; }
.opa-pub-page-btn.active { background: #1e3a8a; color: #fff !important; border-color: #1e3a8a; font-weight: 700; }
.opa-pub-page-btn.disabled { opacity: .35; pointer-events: none; cursor: default; }
.opa-pub-page-gap { padding: 0 4px; color: #94a3b8; font-size: 14px; }
