/* =========================
   Path UI (Interactive Guide)
   Shared styles for Path pages that use Kybalion-style cards + modal + filters
   ========================= */

/* Spacing blocks */
.instructions,
.emergency,
.routine,
.filter-bar {
  margin-bottom: 2rem;
}

.instructions h2,
.emergency h2,
.routine h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.instructions p {
  max-width: 40rem;
  font-size: 0.98rem;
  color: #e5e7eb;
}

/* Emergency buttons */
.emergency-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.emergency button {
  flex: 1 1 180px;
  min-width: 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
}

.emergency button span {
  font-size: 0.8rem;
  color: #9ca3af;
}

.emergency button:hover {
  background: rgba(30, 64, 175, 0.9);
}

/* Routine list */
.routine ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.routine li {
  padding: 0.5rem 0;
  cursor: pointer;
  font-size: 0.95rem;
}

.routine li + li {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.routine li strong {
  color: #e5e7eb;
}

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

#categoryFilter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#categoryFilter button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 0.25rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
}

#categoryFilter button.active {
  background: #22c55e;
  border-color: #22c55e;
  color: #020617;
}

#searchInput {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  font-size: 0.85rem;
}

/* Grid */
#principlesGrid.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

/* Card base */
.card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #22c55e;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* path-guide.js markup inside cards */
.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #e5e7eb;
}

.card-subtitle {
  font-size: 0.92rem;
  color: #cbd5f5;
  margin-bottom: 0.5rem;
}

.card-action {
  font-size: 0.92rem;
  color: #e5e7eb;
  opacity: 0.95;
  line-height: 1.45;
}

.card-footer {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Modal */
.modal {
position: fixed;
inset: 0;
display: none;
align-items: center;
justify-content: center;
z-index: 10000; /* above sticky header/ad */
}


.modal.show {
display: flex;
}


.modal-backdrop {
position: absolute;
inset: 0;
background: rgba(15, 23, 42, 0.8);
backdrop-filter: blur(6px);
z-index: 0;
}


.modal-content {
position: relative;
background: #020617;
border-radius: 1.25rem;
padding: 1.25rem 1.4rem 1.6rem;
width: min(680px, 100% - 2rem);
border: 1px solid rgba(148, 163, 184, 0.7);
box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
overflow-y: auto;
max-height: 90vh;
z-index: 1;
}


.close-modal {
position: absolute;
top: 0.75rem;
right: 0.9rem;
font-size: 1.4rem;
background: none;
border: none;
color: #9ca3af;
cursor: pointer;
z-index: 2;
}

#modalBody h2 {
  margin-top: 0;
}

#modalBody h3 {
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

#modalBody p,
#modalBody ul {
  font-size: 0.95rem;
}

#modalBody ul {
  padding-left: 1.1rem;
}

#modalBody li + li {
  margin-top: 0.3rem;
}


.close-modal:hover {
  color: #e5e7eb;
}


