/* Tool pages (Numerology / Angel Numbers / Crystal Library)
   Enqueued only when the corresponding shortcodes are on the page.
   Keeps styling consistent with the ConjuresUp dashboard theme.
*/

.csd-tool-page{
  max-width:1120px;
  margin:0 auto;
  padding:72px 18px 90px;
}

.csd-tool-page .csd-tool-desc{
  margin:0 0 18px;
  max-width:68ch;
  opacity:.9;
}

.csd-tool-card{
  border-radius:22px;
  padding:26px 22px;
  background:linear-gradient(135deg, rgba(250,244,255,.92), rgba(255,246,235,.92));
  border:1px solid rgba(210,165,55,.28);
  box-shadow:0 18px 45px rgba(0,0,0,.14);
  overflow:hidden;
}

/* Grid helpers */
.csd-grid{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; align-items:end; }
.csd-grid-3{ grid-template-columns:repeat(3, minmax(0,1fr)); }
@media (max-width: 920px){
  .csd-grid, .csd-grid-3{ grid-template-columns:1fr; }
}

.csd-tool-card label{
  display:block;
  font-weight:700;
  font-size:14px;
  letter-spacing:.02em;
}

.csd-tool-card input,
.csd-tool-card select{
  width:100%;
  margin-top:8px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(40,20,70,.22);
  background:rgba(255,255,255,.95);
  color:rgba(20,12,32,.95);
  outline:none;
}

.csd-tool-card input:focus,
.csd-tool-card select:focus{
  border-color:rgba(210,165,55,.55);
  box-shadow:0 0 0 3px rgba(210,165,55,.18);
}

.csd-actions{
  display:flex;
  gap:10px;
  margin-top:16px;
  flex-wrap:wrap;
}

.csd-actions-tight{ margin-top:10px; }

/* Details / chips */
.csd-details summary{ cursor:pointer; font-weight:900; }
.csd-subhead{ margin:14px 0 6px; font-size:14px; letter-spacing:.02em; }

.csd-chiplist{ display:flex; gap:8px; flex-wrap:wrap; margin:6px 0 0; }
.csd-chip{
  appearance:none;
  border:1px solid rgba(40,20,70,.18);
  background:rgba(255,255,255,.8);
  border-radius:999px;
  padding:8px 12px;
  font-weight:800;
  cursor:pointer;
}
.csd-chip:hover{ filter:brightness(1.03); }

.csd-btn{
  appearance:none;
  border:1px solid rgba(40,20,70,.18);
  background:rgba(255,255,255,.88);
  color:rgba(20,12,32,.95);
  border-radius:999px;
  padding:10px 18px;
  font-weight:800;
  letter-spacing:.02em;
  cursor:pointer;
  transition:transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.csd-btn:hover{ transform:translateY(-1px); box-shadow:0 10px 22px rgba(0,0,0,.12); }

.csd-btn-primary{
  background:linear-gradient(135deg, rgba(246,217,138,.98), rgba(232,154,67,.98));
  border-color:rgba(210,165,55,.42);
}

.csd-link{
  background:transparent;
  border:none;
  padding:10px 6px;
  text-decoration:underline;
}

.csd-tool-result{
  margin-top:18px;
  padding:14px 14px;
  border-radius:16px;
  border:1px dashed rgba(40,20,70,.22);
  background:rgba(255,255,255,.62);
  min-height:18px;
}

.csd-muted{ opacity:.75; font-size:13px; }

/* Modal */
.csd-modal{ position:fixed; inset:0; display:none; z-index:9999; }
.csd-modal.is-open{ display:block; }
.csd-modal__backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); }
.csd-modal__panel{
  position:relative;
  max-width:720px;
  margin:6vh auto;
  background:linear-gradient(135deg, rgba(250,244,255,.98), rgba(255,246,235,.98));
  border:1px solid rgba(210,165,55,.28);
  border-radius:22px;
  box-shadow:0 22px 60px rgba(0,0,0,.28);
  padding:20px 18px;
}
.csd-modal__close{
  position:absolute;
  top:10px;
  right:12px;
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid rgba(40,20,70,.18);
  background:rgba(255,255,255,.85);
  font-size:22px;
  font-weight:900;
  cursor:pointer;
}
.csd-modal__title{ margin:6px 0 14px; font-weight:950; }
.csd-modal__body{ margin-top:6px; }
.csd-modal__actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.csd-modal__note{ margin-top:12px; }
.csd-modal textarea{
  width:100%;
  margin-top:8px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(40,20,70,.22);
  background:rgba(255,255,255,.95);
}

.csd-kv{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px; }
@media (max-width: 720px){ .csd-kv{ grid-template-columns:1fr; } }
.csd-kv strong{ display:block; }

.csd-crystal-image-wrap{
  width:100%;
  margin:8px 0 12px;
  display:flex;
  justify-content:center;
}
.csd-crystal-image{
  max-width:220px;
  width:100%;
  height:auto;
  border-radius:18px;
  border:1px solid rgba(40,20,70,.10);
  box-shadow:0 14px 34px rgba(0,0,0,.12);
  background:rgba(255,255,255,.9);
}

/* Crystal Library */
.csd-crystal-filters{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-end;
}

.csd-crystal-filters label{ min-width: 180px; flex: 1 1 180px; }

.csd-crystal-table-wrap{ margin-top:18px; overflow:auto; }

.csd-crystal-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:760px;
}

.csd-crystal-table th,
.csd-crystal-table td{
  padding:12px 12px;
  border-bottom:1px solid rgba(40,20,70,.10);
  text-align:left;
  vertical-align:top;
}

.csd-crystal-table thead th{
  position:sticky;
  top:0;
  background:rgba(255,255,255,.90);
  backdrop-filter:saturate(120%) blur(6px);
  font-weight:900;
  letter-spacing:.02em;
}

.csd-crystal-name{ font-weight:900; }

/* Back button */
.csd-tool-page .csd-back{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:18px;
  padding:10px 16px;
  border-radius:999px;
  text-decoration:none;
  font-weight:800;
  background:rgba(246,217,138,.92);
  color:rgba(20,12,32,.92);
}

.csd-tool-page .csd-back:hover{ filter:brightness(1.03); }


.csd-tool-title{
  margin:0 0 10px 0;
  font-size:22px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
