/* TH — Citation du Jour (v1.0.1)
   Minimal, compatible Astra/Astra-child
*/

.th-cdj-card{
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  padding:18px;
  background:#fff;
  box-shadow:0 14px 34px rgba(0,0,0,.08);
  max-width: 720px;
  margin: 0 auto;
}

.th-cdj-badge{
  display:inline-block;
  font:600 12px/1.1 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  letter-spacing:.06em;
  text-transform:uppercase;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(0,0,0,.06);
  margin-bottom:12px;
}

.th-cdj-quote{ margin:0; }

.th-cdj-text{
  font:500 18px/1.55 Georgia, "Times New Roman", Times, serif;
  margin: 0 0 10px 0;
}

.th-cdj-author{
  font:600 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  opacity:.85;
}

.th-cdj-meta{
  margin-top:12px;
  font:500 13px/1.35 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  opacity:.85;
}

.th-cdj-theme{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(0,0,0,.06);
  margin-right:8px;
}

.th-cdj-tags{ opacity:.9; }

/* Overlay */
.th-cdj-overlay{
  position:fixed;
  inset:0;
  z-index:999999;
  display:none;
  align-items:center;
  justify-content:center;
  padding: max(14px, env(safe-area-inset-top))
           max(14px, env(safe-area-inset-right))
           max(14px, env(safe-area-inset-bottom))
           max(14px, env(safe-area-inset-left));
  background:rgba(0,0,0,.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.th-cdj-overlay.is-open{ display:flex; }

.th-cdj-overlay__card{
  width: min(720px, 100%);
  max-height: 100%;
  overflow:auto;
  position:relative;
}

.th-cdj-card--overlay{
  border-radius:22px;
}

.th-cdj-close{
  position:absolute;
  top:10px;
  right:10px;
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  font-size:26px;
  line-height:1;
  cursor:pointer;
}

.th-cdj-actions{
  display:flex;
  gap:10px;
  padding:12px;
  justify-content:center;
}

.th-cdj-btn{
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font:600 14px/1 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.th-cdj-btn--primary{
  background:#111;
  color:#fff;
  border-color:#111;
}

/* Floating button */
.th-cdj-fab{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:999998;
  width:54px;
  height:54px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  box-shadow:0 16px 40px rgba(0,0,0,.18);
  font-size:20px;
  cursor:pointer;
  display:none;
}

.th-cdj-fab.is-visible{ display:block; }

/* Better typography on small screens */
@media (max-width: 520px){
  .th-cdj-card{ padding:16px; }
  .th-cdj-text{ font-size:17px; }
}

/* =========================
   PWA App Shell (/cdj/)
   ========================= */
.th-cdj-app{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: radial-gradient(1200px 700px at 50% -20%, rgba(102,126,234,.18), transparent 60%),
              radial-gradient(900px 600px at 80% 120%, rgba(118,75,162,.18), transparent 55%),
              #0b1220;
}

.th-cdj-app-inner{
  width: min(760px, 100%);
}

.th-cdj-app-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 14px;
  color: rgba(255,255,255,.92);
  font:600 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.th-cdj-app-title{
  font:700 18px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  margin:0;
}

.th-cdj-app-sub{
  opacity:.85;
  font:500 13px/1.25 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  margin:6px 0 0;
}

.th-cdj-app-date{
  opacity:.85;
  font:600 12px/1 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.th-cdj-card--app{
  background: rgba(255,255,255,.98);
  border-color: rgba(255,255,255,.18);
}

.th-cdj-app-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 12px;
}

.th-cdj-app-actions .th-cdj-btn{
  border-color: rgba(255,255,255,.18);
}

.th-cdj-install-hint{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  font:500 13px/1.35 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.th-cdj-toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font:600 13px/1 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 999999;
}
.th-cdj-toast.is-on{ opacity: 1; }

@media (max-width: 520px){
  .th-cdj-app{ padding: 14px; }
  .th-cdj-app-title{ font-size: 17px; }
}
