/* ShayariGPT Shair Cards 1.5 — layout-safe, card-scoped only
 * IMPORTANT: Every frontend rule is scoped to .sgpsc-card and its children.
 * This stylesheet does NOT style body, article, entry-content, images, sidebars,
 * headings, WordPress buttons, or theme containers.
 */

.sgpsc-card{
  --sgpsc-c:#7c3aed;
  --sgpsc-c2:#9b5cf6;
  --sgpsc-bg:#ffffff;
  --sgpsc-soft:#faf9fd;
  --sgpsc-txt:#172033;
  --sgpsc-muted:#667085;
  --sgpsc-line:#e8e5ef;

  position:relative;
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  clear:both;
  margin:20px 0 24px;
  padding:22px 24px 18px;
  overflow:hidden;
  border:1px solid var(--sgpsc-line);
  border-radius:18px;
  background:var(--sgpsc-bg);
  box-shadow:0 10px 30px rgba(23,32,51,.05);
  color:var(--sgpsc-txt);
  transform:none;
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.sgpsc-card:hover{
  transform:translateY(-1px);
  border-color:#ddd6ec;
  box-shadow:0 14px 34px rgba(23,32,51,.075);
}

.sgpsc-card::before{
  content:"";
  position:absolute;
  left:0;
  top:22px;
  bottom:22px;
  width:3px;
  border-radius:0 6px 6px 0;
  background:linear-gradient(180deg,var(--sgpsc-c),var(--sgpsc-c2));
  pointer-events:none;
}

.sgpsc-card::after{
  content:"";
  position:absolute;
  right:-85px;
  top:-95px;
  width:165px;
  height:165px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(124,58,237,.07),rgba(124,58,237,0) 70%);
  pointer-events:none;
}

.sgpsc-card *,
.sgpsc-card *::before,
.sgpsc-card *::after{
  box-sizing:border-box;
}

.sgpsc-card .sgpsc-quote{
  position:relative;
  z-index:1;
  display:block;
  width:100%;
  min-width:0;
}

.sgpsc-card .sgpsc-urdu{
  display:block;
  width:100%;
  min-width:0;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:var(--sgpsc-txt) !important;
  font-family:"Noto Nastaliq Urdu","Jameel Noori Nastaleeq","Noto Naskh Arabic",serif !important;
  font-size:clamp(1.06rem,1.25vw,1.28rem) !important;
  line-height:2 !important;
  font-weight:600 !important;
  text-align:right !important;
  direction:rtl !important;
  letter-spacing:0 !important;
  overflow-wrap:anywhere;
}

.sgpsc-card .sgpsc-urdu::before,
.sgpsc-card .sgpsc-urdu::after{
  display:none !important;
  content:none !important;
}

.sgpsc-card .sgpsc-line{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0 !important;
  padding:0 !important;
}

.sgpsc-card .sgpsc-line + .sgpsc-line{
  margin-top:2px !important;
}

.sgpsc-card .sgpsc-roman{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:15px 0 0 !important;
  padding:11px 13px !important;
  border:1px solid #ece8f4 !important;
  border-radius:12px;
  background:#faf8fe !important;
  color:var(--sgpsc-muted) !important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif !important;
  font-size:.92rem !important;
  line-height:1.65 !important;
  font-style:normal !important;
  text-align:left !important;
  overflow-wrap:anywhere;
}

.sgpsc-card .sgpsc-actions{
  position:relative;
  z-index:1;
  display:flex;
  width:100%;
  min-width:0;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:16px 0 0 !important;
  padding:14px 0 0 !important;
  border:0;
  border-top:1px solid var(--sgpsc-line);
}

.sgpsc-card .sgpsc-btn{
  appearance:none;
  -webkit-appearance:none;
  display:inline-flex;
  width:auto;
  max-width:100%;
  min-width:0;
  min-height:40px;
  align-items:center;
  justify-content:center;
  gap:7px;
  margin:0 !important;
  padding:9px 13px;
  border:1px solid #dfdbe8;
  border-radius:11px;
  background:#fff;
  box-shadow:0 2px 7px rgba(23,32,51,.025);
  color:#485066;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:.82rem;
  font-weight:700;
  line-height:1.15;
  text-align:center;
  text-decoration:none;
  white-space:normal;
  overflow-wrap:anywhere;
  cursor:pointer;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease,color .16s ease;
}

.sgpsc-card .sgpsc-btn:hover{
  transform:translateY(-1px);
  border-color:#cfc5e8;
  background:#fbf9ff;
  color:var(--sgpsc-c);
  box-shadow:0 7px 16px rgba(64,43,96,.07);
}

.sgpsc-card .sgpsc-btn:active{
  transform:none;
  box-shadow:0 2px 7px rgba(23,32,51,.04);
}

.sgpsc-card .sgpsc-btn:focus-visible{
  outline:3px solid rgba(124,58,237,.15);
  outline-offset:2px;
}

.sgpsc-card .sgpsc-copy{
  background:#fcfbff;
}

.sgpsc-card .sgpsc-download{
  border-color:transparent;
  background:linear-gradient(135deg,var(--sgpsc-c),var(--sgpsc-c2));
  color:#fff;
  box-shadow:0 7px 16px rgba(124,58,237,.16);
}

.sgpsc-card .sgpsc-download:hover{
  border-color:transparent;
  background:linear-gradient(135deg,#6f2fe0,#8b4de8);
  color:#fff;
  box-shadow:0 10px 20px rgba(124,58,237,.2);
}

.sgpsc-card .sgpsc-share{
  margin-left:auto !important;
  background:#fff;
}

.sgpsc-card .sgpsc-btn.is-done{
  border-color:#bbf7d0 !important;
  background:#f0fdf4 !important;
  box-shadow:none !important;
  color:#15803d !important;
}

.sgpsc-card .sgpsc-icon{
  display:inline-grid;
  place-items:center;
  width:15px;
  height:15px;
  flex:0 0 15px;
}

.sgpsc-card .sgpsc-icon svg{
  display:block;
  width:15px;
  height:15px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* 10 styles — scoped ONLY when the element itself is a shair card */
.sgpsc-card.sgpsc-style-1{
  --sgpsc-c:#7c3aed;--sgpsc-c2:#9b5cf6;--sgpsc-bg:#fff;--sgpsc-txt:#172033;--sgpsc-muted:#667085;
}

.sgpsc-card.sgpsc-style-2{
  --sgpsc-c:#7c3aed;--sgpsc-c2:#7c3aed;
  box-shadow:none;
  border-radius:16px;
}
.sgpsc-card.sgpsc-style-2::before,
.sgpsc-card.sgpsc-style-2::after{display:none}
.sgpsc-card.sgpsc-style-2 .sgpsc-roman{
  border-left:3px solid #d8cdf7 !important;
  border-radius:0 10px 10px 0;
  background:#fff !important;
}

.sgpsc-card.sgpsc-style-3{
  --sgpsc-c:#7c3aed;--sgpsc-c2:#d946ef;--sgpsc-bg:#fbfaff;
}
.sgpsc-card.sgpsc-style-3::before{
  top:0;right:0;bottom:auto;left:0;width:100%;height:3px;
  border-radius:18px 18px 0 0;
  background:linear-gradient(90deg,#7c3aed,#a855f7,#d946ef);
}

.sgpsc-card.sgpsc-style-4{
  --sgpsc-c:#6d28d9;--sgpsc-c2:#7c3aed;
  box-shadow:none;border-radius:12px;border-left:4px solid #7c3aed;
}
.sgpsc-card.sgpsc-style-4::before,
.sgpsc-card.sgpsc-style-4::after{display:none}
.sgpsc-card.sgpsc-style-4 .sgpsc-actions{justify-content:flex-end}
.sgpsc-card.sgpsc-style-4 .sgpsc-share{margin-left:0 !important}

.sgpsc-card.sgpsc-style-5{
  --sgpsc-c:#7c3aed;--sgpsc-c2:#9b5cf6;
  box-shadow:none;border-color:#dcd7e8;
}
.sgpsc-card.sgpsc-style-5::before,
.sgpsc-card.sgpsc-style-5::after{display:none}
.sgpsc-card.sgpsc-style-5 .sgpsc-roman{
  background:#fff !important;border-style:dashed !important;
}

.sgpsc-card.sgpsc-style-6{
  --sgpsc-c:#7c3aed;--sgpsc-c2:#c026d3;
  box-shadow:0 16px 38px rgba(23,32,51,.08);
  border-color:#ece9f2;
}
.sgpsc-card.sgpsc-style-6::before{top:0;bottom:0;width:4px}

.sgpsc-card.sgpsc-style-7{
  --sgpsc-c:#7c3aed;--sgpsc-c2:#9b5cf6;
  padding:18px 18px 15px;border-radius:14px;box-shadow:none;
}
.sgpsc-card.sgpsc-style-7 .sgpsc-urdu{
  font-size:clamp(1rem,1.15vw,1.18rem) !important;
  line-height:1.96 !important;
}
.sgpsc-card.sgpsc-style-7 .sgpsc-roman{
  margin-top:10px !important;padding:9px 11px !important;font-size:.86rem !important;
}
.sgpsc-card.sgpsc-style-7 .sgpsc-actions{
  margin-top:12px !important;padding-top:11px !important;
}

.sgpsc-card.sgpsc-style-8{text-align:center}
.sgpsc-card.sgpsc-style-8::before{display:none}
.sgpsc-card.sgpsc-style-8 .sgpsc-urdu{text-align:center !important}
.sgpsc-card.sgpsc-style-8 .sgpsc-roman{text-align:center !important}
.sgpsc-card.sgpsc-style-8 .sgpsc-actions{justify-content:center}
.sgpsc-card.sgpsc-style-8 .sgpsc-share{margin-left:0 !important}

.sgpsc-card.sgpsc-style-9{
  --sgpsc-c:#a78bfa;--sgpsc-c2:#c084fc;--sgpsc-bg:#172033;--sgpsc-txt:#f8fafc;--sgpsc-muted:#cbd5e1;
  border-color:#2a3852;box-shadow:0 14px 34px rgba(15,23,42,.16);
}
.sgpsc-card.sgpsc-style-9::after{
  background:radial-gradient(circle,rgba(167,139,250,.14),rgba(167,139,250,0) 70%);
}
.sgpsc-card.sgpsc-style-9 .sgpsc-roman{
  background:#202b42 !important;border-color:#33415c !important;
}
.sgpsc-card.sgpsc-style-9 .sgpsc-actions{border-color:#33415c}
.sgpsc-card.sgpsc-style-9 .sgpsc-btn:not(.sgpsc-download){
  background:#202b42;color:#e5e7eb;border-color:#3b4860;
}

.sgpsc-card.sgpsc-style-10{
  --sgpsc-c:#7357aa;--sgpsc-c2:#9a7bc9;--sgpsc-bg:#fdfcf9;--sgpsc-txt:#242128;--sgpsc-muted:#746d78;
  border-color:#e7e1d7;border-radius:10px;box-shadow:0 8px 22px rgba(50,42,30,.05);
}
.sgpsc-card.sgpsc-style-10::before{width:2px;background:#9276c5}
.sgpsc-card.sgpsc-style-10::after{
  background:radial-gradient(circle,rgba(146,118,197,.09),rgba(146,118,197,0) 70%);
}

/* Mobile: changes ONLY the card itself, never the post/theme layout */
@media (max-width:640px){
  .sgpsc-card{
    width:100%;
    max-width:100%;
    min-width:0;
    margin:16px 0 19px;
    padding:18px 14px 15px;
    border-radius:15px;
  }
  .sgpsc-card::before{top:17px;bottom:17px}
  .sgpsc-card .sgpsc-urdu{
    font-size:1rem !important;
    line-height:1.92 !important;
  }
  .sgpsc-card .sgpsc-roman{
    margin-top:11px !important;
    padding:9px 10px !important;
    font-size:.86rem !important;
    line-height:1.58 !important;
  }
  .sgpsc-card .sgpsc-actions{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:7px;
    margin-top:13px !important;
    padding-top:12px !important;
  }
  .sgpsc-card .sgpsc-btn{
    width:100%;
    min-width:0;
    min-height:39px;
    padding:8px 7px;
    font-size:.76rem;
  }
  .sgpsc-card .sgpsc-share{
    grid-column:1 / -1;
    margin-left:0 !important;
  }
}

/* Very narrow phones */
@media (max-width:380px){
  .sgpsc-card{padding:16px 12px 14px}
  .sgpsc-card .sgpsc-actions{grid-template-columns:1fr}
  .sgpsc-card .sgpsc-share{grid-column:auto}
}

/* Admin-only preview layout */
.sgpsc-admin .sgpsc-style-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(280px,1fr));
  gap:16px;
  max-width:1080px;
  margin:18px 0 28px;
}
.sgpsc-admin .sgpsc-choice{
  display:block;
  padding:13px;
  border:1px solid #dcdcde;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
}
.sgpsc-admin .sgpsc-preview{
  margin:0 !important;
  min-height:118px !important;
  padding:16px !important;
}
.sgpsc-admin .sgpsc-preview-urdu{
  display:block;
  text-align:right;
  direction:rtl;
  font-family:"Noto Nastaliq Urdu","Jameel Noori Nastaleeq",serif;
  font-size:15px;
  line-height:1.95;
  font-weight:600;
  color:var(--sgpsc-txt);
}
.sgpsc-admin .sgpsc-preview-roman{
  display:block;
  margin-top:8px;
  padding:7px 9px;
  border-radius:8px;
  background:var(--sgpsc-soft);
  color:var(--sgpsc-muted);
  font-size:12px;
}
.sgpsc-admin .sgpsc-preview-actions{display:flex;gap:6px;margin-top:9px}
.sgpsc-admin .sgpsc-preview-actions b{
  font-size:10px;padding:5px 7px;border-radius:7px;background:var(--sgpsc-soft);color:var(--sgpsc-c);
}
@media(max-width:782px){
  .sgpsc-admin .sgpsc-style-grid{grid-template-columns:1fr}
}
