/* public/css/admin/signature_manager.css */

#emailSignatureManager {
  grid-column: 1 / -1;
  min-width: 0;
}

.gs-signature-card-header {
  align-items: center;
}

.gs-signature-manager-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 540px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
}

.gs-signature-sidebar {
  min-width: 0;
  border-right: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
}

.gs-signature-sidebar-title {
  padding: 14px 14px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gs-signature-list {
  display: grid;
  gap: 6px;
  padding: 0 8px 12px;
}

.gs-signature-list-empty {
  padding: 16px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.gs-signature-list-item {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.gs-signature-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.gs-signature-list-item.active {
  border-color: rgba(255, 102, 66, 0.5);
  background: rgba(255, 102, 66, 0.12);
  box-shadow: inset 3px 0 0 var(--gs-coral, #ff6642);
}

.gs-signature-list-name {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gs-signature-list-account {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gs-signature-list-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.gs-signature-list-badges span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 102, 66, 0.14);
  color: var(--text);
  font-size: 10px;
  font-weight: 750;
}

.gs-signature-editor-panel {
  min-width: 0;
  padding: 18px;
}

.gs-signature-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.gs-signature-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.gs-signature-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.gs-signature-field-wide {
  grid-column: 1 / -1;
}

.gs-signature-defaults {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 8px 0 2px;
}

.gs-signature-defaults label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.gs-signature-composer {
  overflow: hidden;
  border: 1px solid rgba(28, 35, 41, 0.16);
  border-radius: 14px;
  background: #ffffff;
}

.gs-signature-editor {
  position: relative;
  min-height: 290px;
  max-height: 460px;
  overflow: auto;
  padding: 24px;
  outline: none;
  background: #ffffff;
  color: #1c2329;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.gs-signature-editor:empty::before {
  color: rgba(28, 35, 41, 0.45);
  content: "Build the signature here. You can type, format text, or drag an image into this area.";
  pointer-events: none;
}

.gs-signature-editor.is-dragging {
  background: rgba(255, 102, 66, 0.08);
  box-shadow: inset 0 0 0 3px rgba(255, 102, 66, 0.42);
}

.gs-signature-editor img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
}

.gs-signature-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid rgba(28, 35, 41, 0.12);
  background: #f7f8fa;
}

.gs-signature-tool,
.gs-signature-tool-select,
.gs-signature-tool-color {
  min-height: 38px;
  border: 1px solid rgba(28, 35, 41, 0.14);
  border-radius: 9px;
  background: #ffffff;
  color: #1c2329;
}

.gs-signature-tool {
  min-width: 38px;
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.gs-signature-tool:hover {
  border-color: rgba(255, 102, 66, 0.5);
  background: rgba(255, 102, 66, 0.08);
}

.gs-signature-tool-select {
  min-width: 120px;
  padding: 7px 9px;
}

.gs-signature-tool-color {
  width: 42px;
  padding: 4px;
  cursor: pointer;
}

.gs-signature-toolbar-separator {
  width: 1px;
  height: 26px;
  margin: 0 2px;
  background: rgba(28, 35, 41, 0.14);
}

.gs-signature-upload-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.gs-signature-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.gs-signature-footer-status {
  min-width: 0;
  flex: 1;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1050px) {
  .gs-signature-manager-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .gs-signature-manager-shell {
    display: block;
  }

  .gs-signature-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .gs-signature-list {
    display: flex;
    overflow-x: auto;
    padding: 0 10px 12px;
  }

  .gs-signature-list-item {
    width: 190px;
    min-width: 190px;
  }

  .gs-signature-editor-panel {
    padding: 13px;
  }

  .gs-signature-editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gs-signature-field-wide,
  .gs-signature-defaults {
    grid-column: auto;
  }

  .gs-signature-defaults {
    display: grid;
    gap: 10px;
  }

  .gs-signature-editor {
    min-height: 240px;
    padding: 18px;
  }

  .gs-signature-tool-select {
    flex: 1 1 130px;
  }

  .gs-signature-footer {
    flex-wrap: wrap;
  }

  .gs-signature-footer-status {
    flex-basis: 100%;
    order: -1;
  }
}