
.gbl-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.gbl-header {
  text-align: center;
  margin-bottom: 16px;
}

.gbl-title {
  font-size: 1.6rem;
  margin: 0 0 8px;
}

.gbl-description {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

.gbl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.gbl-search {
  flex: 1 1 220px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #d0d7de;
  font-size: 0.95rem;
}

.gbl-filter {
  flex: 0 0 180px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #d0d7de;
  font-size: 0.9rem;
}

/* Sections */
.gbl-hierarchy-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gbl-section {
  background: #f9fafb;
  border-radius: 14px;
  padding: 10px 10px 6px;
  border: 1px solid #e2e8f0;
}

.gbl-section-header h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.gbl-section-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gbl-row {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}

.gbl-row-inner {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  gap: 8px;
}

.gbl-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
}

.gbl-row-thumb img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

.gbl-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.gbl-row-name-mn {
  font-size: 0.95rem;
  font-weight: 600;
}

.gbl-row-name-en {
  font-size: 0.78rem;
  color: #64748b;
}

/* MODAL */
.gbl-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.gbl-modal.gbl-open {
  display: flex;
}

.gbl-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

/* Make dialog responsive + scrollable */
.gbl-modal-dialog {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
  z-index: 1;
}

.gbl-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.gbl-modal-body {
  margin-top: 8px;
  padding: 18px 20px 16px;
  overflow-y: auto;
}

/* ensure padding doesn't get clipped on small screens */
.gbl-modal-body::-webkit-scrollbar {
  width: 6px;
}
.gbl-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.gbl-modal-hierarchy {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 4px;
}

.gbl-modal h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.gbl-modal-names {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #475569;
  white-space: pre-line;
}

.gbl-modal-images {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.gbl-modal-img {
  flex: 1 1 45%;
  background: #f8fafc;
  border-radius: 10px;
  padding: 6px;
  text-align: center;
}

.gbl-modal-img img {
  max-width: 100%;
  border-radius: 8px;
  height: auto;
}

.gbl-img-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 4px;
}

.gbl-img-credit {
  margin-top: 2px;
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Tabs */
.gbl-modal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.gbl-tab-button {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  color: #64748b;
}

.gbl-tab-button.gbl-tab-active {
  background: #0f172a;
  color: #e5e7eb;
}

.gbl-tab-panel {
  display: none;
}

.gbl-tab-panel.gbl-tab-panel-active {
  display: block;
}

.gbl-modal-descriptions p {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.gbl-modal-mantra pre {
  margin: 0 0 6px;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: #f8fafc;
  padding: 6px 8px;
  border-radius: 6px;
}

.gbl-modal-audio {
  margin-top: 6px;
}

.gbl-modal-audio audio {
  width: 100%;
}

@media (max-width: 640px) {
  .gbl-row-thumb img {
    width: 48px;
    height: 48px;
  }
  .gbl-modal-dialog {
    max-height: 92vh;
    width: 96%;
  }
  .gbl-modal-images {
    flex-direction: column;
  }
}
