/* =========================
   Signature Generator Styles
   ========================= */

.sg-wrap{
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Layout: left controls fixed-ish, right preview gets most width */
.sg-grid{
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(740px, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
}

/* Card base */
.sg-card{
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  width: auto;
  max-width: none;
}

.sg-card h2{
  margin: 0 0 6px;
}

.sg-hint{
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  line-height: 1.4;
}

.sg-label{
  display: block;
  font-size: 12px;
  margin: 10px 0 6px;
  color: #333;
}

.sg-input{
  width: 100%;
  padding: 10px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  font-size: 14px;
  box-sizing: border-box;
}

.sg-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sg-row > div{
  min-width: 0;
}

.sg-btns{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sg-btn{
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
  background: #111;
  color: #fff;
}

.sg-btn.sg-secondary{
  background: #f2f2f2;
  color: #111;
}

.sg-status{
  font-size: 13px;
  margin-top: 10px;
}

.sg-status.sg-ok{ color: #0a7a2f; }
.sg-status.sg-err{ color: #b00020; }

/* =========================
   Preview (Email canvas feel)
   ========================= */

.sg-previewWrap{
  width: 100%;
  border: 1px dashed #d0d0d0;
  border-radius: 12px;
  padding: 14px;
  background: #fafafa;
}

.sg-previewTitle{
  font-size: 12px;
  color: #555;
  margin-bottom: 10px;
}

.sg-preview{
  width: 100%;
  max-width: none;
  min-height: 420px;      /* bigger, more like an email */
  padding: 24px;          /* breathing room */
  overflow-x: auto;

  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
}

/* Sticky preview so it stays visible */
.sg-sticky{
  position: sticky;
  top: 16px;
}

/* =========================
   Accordion
   ========================= */

.sg-acc{
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 12px;
}

.sg-acc-btn{
  width: 100%;
  text-align: left;
  background: #fafafa;
  border: 0;
  padding: 12px 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sg-acc-btn span{
  font-size: 13px;
}

.sg-acc-panel{
  padding: 12px;
  border-top: 1px solid #eee;
  display: none;
}

.sg-acc-panel.is-open{
  display: block;
}

/* Inline color picker rows */
.sg-inline{
  display: flex;
  gap: 10px;
  align-items: center;
}

.sg-color{
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

/* =========================
   Disclaimers
   ========================= */

.sg-disc-list{
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 10px;
  max-height: 320px;
  overflow: auto;
  background: #fff;
}

.sg-disc-item{
  border-bottom: 1px solid #f1f1f1;
  padding: 8px 0;
}

.sg-disc-item:last-child{
  border-bottom: 0;
}

.sg-disc-title{
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sg-disc-title strong{
  font-size: 13px;
  display: block;
}

.sg-disc-snippet{
  font-size: 12px;
  color: #666;
  line-height: 1.35;
  margin-top: 2px;
}

.sg-disc-full{
  margin-top: 6px;
  font-size: 12px;
  color: #444;
  line-height: 1.4;
  display: none;
  white-space: pre-wrap;
}

.sg-disc-item.is-open .sg-disc-full{
  display: block;
}

.sg-disc-toggle{
  margin-left: auto;
  font-size: 12px;
  color: #111;
  background: #f2f2f2;
  border: 0;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

/* =========================
   Theme override safety
   (Some themes force stacking)
   ========================= */

.sg-wrap .sg-grid{
  display: grid !important;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 920px){
  .sg-grid{
    grid-template-columns: 1fr;
  }
  .sg-sticky{
    position: relative;
    top: auto;
  }
}
