/* ════════════════════════════════════════════════════════════
   PUBLIC/CSS/LIST-VIEW.CSS - List View Styles
   Organized hierarchy with clear sections and media queries
   ════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   1. CONTAINER STYLES
   ───────────────────────────────────────────────────────── */
.listview-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0001;
  margin: 32px auto;
  max-width: 1100px;
  padding: 24px 18px 18px 18px;
}

/* ─────────────────────────────────────────────────────────
   2. HEADER & LAYOUT STYLES
   ───────────────────────────────────────────────────────── */
.listview-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.listview-search {
  flex: 1 1 250px;
  max-width: 320px;
  margin-left: 16px;
}

#listview-table-area {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ─────────────────────────────────────────────────────────
   3. TABLE STYLES
   ───────────────────────────────────────────────────────── */
#listview-table-area .table {
  background: #fafbfc;
  border-radius: 6px;
  overflow: hidden;
}

#listview-table-area tr:hover {
  background: #f0f4fa;
}

#listview-table-area td,
#listview-table-area th {
  vertical-align: middle;
}

/* ─────────────────────────────────────────────────────────
   4. PAGINATION STYLES
   ───────────────────────────────────────────────────────── */

.lv-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px 0 4px;
  width: 100%;
}

.lv-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  line-height: 1;
}

.lv-page-btn:hover:not(:disabled):not(.lv-page-active) {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1d4ed8;
}

.lv-page-btn.lv-page-active {
  background: #3b5bdb;
  border-color: #3b5bdb;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 91, 219, 0.25);
  cursor: default;
}

.lv-page-btn.lv-page-nav {
  color: #64748b;
  padding: 0 8px;
}

.lv-page-btn.lv-page-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.lv-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 36px;
  color: #94a3b8;
  font-size: 15px;
  letter-spacing: 1px;
  pointer-events: none;
  user-select: none;
}

.lv-page-info {
  margin-left: 10px;
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
  align-self: center;
}

/* ─────────────────────────────────────────────────────────
   5. LIST ITEM STYLES
   ───────────────────────────────────────────────────────── */
.list-item-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

.list-item-image {
  width: 32px;
  height: 32px;
  background-size: cover;
  background-position: center;
  border: 2px solid #4CAF50;
  border-radius:50%;
  margin: 0 auto;
}

.listview-container .social-icon {
  width: 22px;
  height: 22px;
  font-size: 12px;
  min-width: 22px;
  min-height: 22px;
}

.social-icons-row {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.social-icon.active {
  width: 28px;
  height: 28px;
  min-width: 22px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: box-shadow 0.15s;
}

.social-icon.active i {
  font-size: 16px;
  line-height: 1;
}

.social-icon.active[data-bgcolor] {
  background: attr(data-bgcolor color, #888);
}

.social-icon:visited {
  color: #fff;
}

.social-icon.inactive {
  width: 28px;
  height: 28px;
  min-width: 22px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e0e0e0;
  color: #9e9e9e;
}

.listview-container .social-icon.startupswatch.active {
  background: #fff;
  border: 1px solid #e0e0e0;
}

/* ═════════════════════════════════════════════════════════
   RESPONSIVE DESIGN - TABLET & DESKTOP
   ═════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   Desktop: Horizontal Layout Optimization
   ───────────────────────────────────────────────────────── */
@media (min-width: 1101px) {
  #listview-table-area {
    overflow-x: visible;
  }
}

/* ─────────────────────────────────────────────────────────
   Tablet: 701px to 1100px
   ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #listview-table-area {
    overflow-x: auto;
  }
}

@media (max-width: 700px) {
  .listview-container {
    padding: 10px 2px;
    margin-top: 50px;
    margin-bottom: 0px;
  }

  .listview-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .listview-search {
    flex: none;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .listview-container table th,
  .listview-container table td {
    padding: 4px 6px;
    font-size: 13px;
  }

  .list-item-logo {
    width: 22px;
    height: 22px;
  }

  .list-item-image {
    width: 26px;
    height: 26px;
    background-size: cover;
    background-position: center;
    border: 1px solid #4CAF50;
    border-radius:50%;
    margin: 4px auto;
  }
}

/* ─────────────────────────────────────────────────────────
   Small Mobile: 500px and below
   ───────────────────────────────────────────────────────── */
@media (max-width: 500px) {
  .lv-page-btn {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
    border-radius: 6px;
  }

  .lv-page-info {
    width: 100%;
    text-align: center;
    margin-left: 0;
    margin-top: 4px;
  }

  /* Organizations table - hide social columns */
  .org-list-table th:nth-child(4),
  .org-list-table td:nth-child(4),
  .org-list-table th:nth-child(5),
  .org-list-table td:nth-child(5) {
    display: none;
  }

  /* People table - hide multiple columns */
  .people-list-table th:nth-child(4),
  .people-list-table td:nth-child(4),
  .people-list-table th:nth-child(5),
  .people-list-table td:nth-child(5),
  .people-list-table th:nth-child(6),
  .people-list-table td:nth-child(6) {
    display: none;
  }
}

/* ═════════════════════════════════════════════════════════
   MOBILE SPECIFIC HEADER STYLES (≤ 768px)
   ═════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   Mobile Header Tabs - Segmented Control
   ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .listview-header {
    flex-direction: column;
    margin-bottom: 0px;
  }

  /* Segmented Control Tabs */
  .listview-header .tabs {
    width: 100%;
    margin: 0 !important;
  }

  .listview-header .tabs ul {
    background: #f1f3f5;
    border-radius: 10px;
    padding: 4px;
    display: flex;
    border: none !important;
    justify-content: space-between;
  }

  .listview-header .tabs li {
    flex: 1;
    margin: 0;
    border: none !important;
  }

  .listview-header .tabs li a {
    border-radius: 8px;
    border: none !important;
    background: transparent;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  /* Active Tab */
  .listview-header .tabs li.is-active a {
    background: #fff;
    color: #0d6efd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 600;
  }

  /* Hide default Bulma active line if present */
  .tabs.is-toggle li.is-active a {
    background-color: #fff;
    border-color: transparent;
    color: #0d6efd;
  }

  /* Mobile Search Input styling */
  .listview-search {
    width: 100%;
    margin: 0 !important;
    max-width: none !important;
    display: none;
  }

  .listview-search input {
    width: 100%;
    max-width: 100% !important;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ccc' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    padding-left: 40px;
    font-size: 16px;
    box-shadow: none;
    transition: border-color 0.2s;
  }

  .listview-search input:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
  }

  /* Header Embedded Search Input */
  .mobile-header #listview-search-input {
    width: 100%;
    height: 36px;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    padding-left: 34px;
    font-size: 16px;
    margin: 0;
    transition: all 0.2s;
  }

  /* Header center container for search input */
  .mobile-header .header-center {
    flex: 1;
    display: flex;
    justify-content: center;
  }

  .mobile-header #listview-search-input:focus {
    background-color: #fff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    width: 100%;
  }
}

/* ─────────────────────────────────────────────────────────
   AUTH GATE
   ───────────────────────────────────────────────────────── */
.list-auth-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: #6b7280;
}
.list-auth-gate p {
  max-width: 360px;
  font-size: 0.95rem;
  line-height: 1.5;
}
