/* Base button (theme mode adds WP classes; custom mode is inline-styled) */
.ai-sum-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid #1e293b;
  cursor: pointer;
  text-decoration: none;
  width: -webkit-fill-available;
  

  /* don't force a color here; let theme or inline style define it */
}

/* Icon in button (uses mask so color inherits from currentColor) */
.ai-sum-btn.ai-has-icon .ai-ico {
  display:inline-block;
  width:1em; height:1em; /* actual px size is overridden inline via PHP */
  margin-right:.4em;
  line-height:1;
  background-color: currentColor;               /* <-- paints the icon */
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 100% 100%;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 100% 100%;
  vertical-align:middle;
}

/* Sparkle icon (mask) */
.ai-sum-btn.ai-icon-sparkle .ai-ico {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M12 2l1.8 4.9L19 8.8l-4.5 3.3L15.6 17 12 14.7 8.4 17l1.1-4.9L5 8.8l5.2-1.9L12 2zM4 4l.9 2.5L8 7.4 5.8 9.1 6.5 12 4 10.4 1.5 12l.7-2.9L0 7.4l3.1-.9L4 4zm16 0l.9 2.5 3.1.9-2.2 1.7.7 2.9L20 10.4 17.5 12l.7-2.9L16 7.4l3.1-.9L20 4z'/></svg>");
  mask-image:         url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M12 2l1.8 4.9L19 8.8l-4.5 3.3L15.6 17 12 14.7 8.4 17l1.1-4.9L5 8.8l5.2-1.9L12 2zM4 4l.9 2.5L8 7.4 5.8 9.1 6.5 12 4 10.4 1.5 12l.7-2.9L0 7.4l3.1-.9L4 4zm16 0l.9 2.5 3.1.9-2.2 1.7.7 2.9L20 10.4 17.5 12l.7-2.9L16 7.4l3.1-.9L20 4z'/></svg>");
}

/* Chat icon (mask) */
.ai-sum-btn.ai-icon-chat .ai-ico {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M4 4h16a2 2 0 012 2v9a2 2 0 01-2 2H9l-5 3v-3H4a2 2 0 01-2-2V6a2 2 0 012-2z'/></svg>");
  mask-image:         url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M4 4h16a2 2 0 012 2v9a2 2 0 01-2 2H9l-5 3v-3H4a2 2 0 01-2-2V6a2 2 0 012-2z'/></svg>");
}


/* AI network icon (mask) */
.ai-sum-btn.ai-icon-ai .ai-ico {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M12 2a2 2 0 110 4 2 2 0 010-4zm0 16a2 2 0 110 4 2 2 0 010-4zM4 10a2 2 0 110 4 2 2 0 010-4zm16 0a2 2 0 110 4 2 2 0 010-4zM12 6v4m0 4v4m-6-4h4m6 0h4m-8-2l-3-2m3 2l3-2' stroke='%23000' fill='none' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  mask-image:         url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M12 2a2 2 0 110 4 2 2 0 010-4zm0 16a2 2 0 110 4 2 2 0 010-4zM4 10a2 2 0 110 4 2 2 0 010-4zm16 0a2 2 0 110 4 2 2 0 010-4zM12 6v4m0 4v4m-6-4h4m6 0h4m-8-2l-3-2m3 2l3-2' stroke='%23000' fill='none' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
/* Modal UI */
.ai-sum-modal[hidden]{ display:none; }
.ai-sum-modal{
  position:fixed; inset:0; background:rgba(0,0,0,.35);
  display:flex; align-items:center; justify-content:center;
  z-index:99999; padding:1rem;
}
.ai-sum-card{
  background:#fff; max-width:520px; width:100%;
  border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.25); overflow:hidden;
}
.ai-sum-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:.8rem 1rem; border-bottom:1px solid #e5e7eb;
}
.ai-sum-head strong{ font-size:1rem; }
.ai-sum-close{ background:transparent; border:0; font-size:1.2rem; cursor:pointer; }
.ai-sum-list{ list-style:none; margin:0; padding:.2rem; }
.ai-sum-list li{ margin:0; }
.ai-sum-list button{
  width:100%; text-align:left; padding:.8rem 1rem;
  background:transparent; border:0; border-bottom:1px solid #f1f5f9; cursor:pointer;
}
.ai-sum-list button:hover{ background:#f8fafc; }
.ai-sum-list li:last-child button{ border-bottom:0; }
