/* =========================================================
   GRIMORIO / LIBRO DELLE OMBRE (In Libro Nominis Umbra)
   Grimorio View Styles — grimorio.css
   ========================================================= */

/* Grimorio Layout Grid */
.grimorio-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .grimorio-layout {
    grid-template-columns: 1fr;
  }
}

/* Sacred Geometry Hero Container (Cover) */
.grimorio-cover-box {
  background: radial-gradient(circle at 50% 40%, #151f2c 0%, #0a0e14 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.grimorio-cover-box h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--gold-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.grimorio-subtitle {
  font-style: italic;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.sacred-svg-container {
  width: 100%;
  max-width: 380px;
  height: 480px;
  margin: 0 auto;
  position: relative;
}

/* Active Chakra Info Card */
.chakra-info-panel {
  background: rgba(13, 20, 29, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  text-align: left;
  transition: all var(--transition-normal);
}

.chakra-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.chakra-info-header h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chakra-info-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.chakra-info-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Grimoire Content & Explorer */
.grimorio-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Grimoire Toolbar */
.grimorio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--bg-card);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.category-filter-strip {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.cat-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cat-filter-btn:hover {
  color: var(--gold-light);
  border-color: var(--gold-primary);
}

.cat-filter-btn.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-light);
  border-color: var(--gold-primary);
  font-weight: 600;
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
}

/* Grimoire Cards Grid */
.grimoire-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.grimoire-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.grimoire-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.grimoire-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0; width: 4px;
  background: var(--card-accent-color, var(--gold-primary));
}

.grimoire-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.grimoire-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.3;
}

.grimoire-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.g-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.g-badge.chakra-1 { border-color: #e53935; color: #ff8a80; }
.g-badge.chakra-2 { border-color: #fb8c00; color: #ffb74d; }
.g-badge.chakra-3 { border-color: #fdd835; color: #fff59d; }
.g-badge.chakra-4 { border-color: #43a047; color: #a5d6a7; }
.g-badge.chakra-5 { border-color: #00acc1; color: #80deea; }
.g-badge.chakra-6 { border-color: #3949ab; color: #9fa8da; }
.g-badge.chakra-7 { border-color: #8e24aa; color: #ce93d8; }

.grimoire-card-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}

.grimoire-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-action-btns {
  display: flex;
  gap: 0.35rem;
}

.card-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.card-icon-btn:hover {
  color: var(--gold-light);
}
.card-icon-btn.delete-btn:hover {
  color: #ff5252;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

/* QR Code & Share Modal */
.qr-modal-content {
  text-align: center;
}

.qr-code-wrapper {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 1rem 0;
  box-shadow: var(--shadow-md);
}

.qr-code-wrapper canvas,
.qr-code-wrapper svg {
  display: block;
  max-width: 220px;
  height: auto;
}

/* Ruota dell'Anno (Wheel of the Year Section) */
.wheel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.sabbat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  transition: all var(--transition-normal);
}

.sabbat-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-3px);
}

.sabbat-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}

.sabbat-date {
  font-size: 0.78rem;
  color: var(--gold-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.6rem;
}

/* Sicrenacc Info & Sovereignty Portal */
.sicrenacc-hero {
  background: radial-gradient(circle at top right, #1c2838 0%, #0d131a 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.sicrenacc-hero h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.sicrenacc-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  border-top: 3px solid var(--gold-primary);
}

.pillar-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}
