/* ---- TSG Main Theme ---- */

div[data-automation-key="tsg_site"] a {
    color: #9bcba6 !important;
    font-weight: 600 !important; /* Semi bold */
    font-family: 'Segoe UI' !important;
    font-size: 16px; /* Closest to 14pt */
}

div[data-automation-key="tsg_surfacename"] {
    color: #9bcba6 !important;
    font-family: 'Segoe UI' !important;
    font-size: 16px !important; /* Closest to 14pt */
    font-weight: 400 !important; /* Regular */
}

table td[data-attribute="tsg_name"] {
    color: #9bcba6 !important;
    font-family: 'Segoe UI' !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

.entity-grid td[data-attribute="tsg_name"] {
    color: #9bcba6 !important;
    font-family: 'Segoe UI' !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

td[data-attribute="tsg_name"]:not(.custom) {
    color: #9bcba6 !important;
}

table td[data-attribute="tsg_title"] {
    color: #2b2a29 !important;
    font-family: 'Segoe UI' !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

.entity-grid td[data-attribute="tsg_title"] {
    color: #2b2a29 !important;
    font-family: 'Segoe UI' !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

td[data-attribute="tsg_title"]:not(.custom) {
    color: #2b2a29 !important;
}

.control .text-muted {
  display: none !important;
}

body, h1, h2, h3, p, td {
    font-family: 'Segoe UI' !important;
}

/* ---- End TSG Main Theme ---- */

/* ---- TSG Form Theme ---- */

.tsg-form-green {
    background-color: rgba(155, 203, 166, 0.6); /* #9bcba6 at 60% opacity */
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-family: 'Segoe UI' !important;
    font-size: 16px !important; /* Closest to 14pt */
    font-weight: 400 !important; /* Regular */
}

.tsg-form-green #EntityFormPanel {
  background-color: transparent; /* Let form background show through */
  border: none;
}

/* Section title */
.tsg-form-green .section-title h3 {
  color: #fff !important;
}

/* Field labels inside green form */
.tsg-form-green .field-label {
  background-color: transparent;
  color: #fff;
}

/* Picklist labels */
.tsg-form-green .picklist label {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Read-only form styling */
.tsg-form-green.tsg-form-readonly .control {
  background-color: transparent; /* let the green form background show through */
  color: #2b2a29;              /* soft dark grey text */
  border: none;
  box-shadow: none;
}

/* Inner read-only elements: text, lookups, date pickers, etc. */
.tsg-form-green.tsg-form-readonly .control input[readonly],
.tsg-form-green.tsg-form-readonly .control select[disabled],
.tsg-form-green.tsg-form-readonly .control textarea[readonly],
.tsg-form-green.tsg-form-readonly .control .lookup,
.tsg-form-green.tsg-form-readonly .control .picklist,
.tsg-form-green.tsg-form-readonly .control .text-muted {
  background-color: transparent !important; /* hide boxes */
  color: #2b2a29 !important;              /* consistent text tone */
  border: none !important;
  box-shadow: none !important;
}

/* ---- End TSG Form Theme ---- */

/* ---- TSG Form Controls ---- */

/* ---- Read-only look for text/number/date inputs ---- */
.tsg-readonly {
  background: #f0f2f5 !important;   /* slightly darker */
  color: #6c757d !important;         /* muted text */
  border-color: #d9d9d9 !important;
  cursor: not-allowed;
  caret-color: transparent;          /* hide the text cursor */
}
.tsg-readonly:focus {
  outline: none;
  box-shadow: none;
}

/* Stronger “locked” look + a lock glyph on the right */
.tsg-readonly-strong {
  background: #eceff3 !important;
  color: #5f6b78 !important;
  border-color: #cfd6dd !important;
  cursor: not-allowed;
  caret-color: transparent;
  padding-right: 2rem !important;    /* space for the icon */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='11' width='18' height='11' rx='2' ry='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1rem 1rem;
}

/* ---- Wrapper + overlay to block interaction on controls without true readonly
       (e.g., selects, lookups with picker buttons). Add .tsg-readonly-wrap to the field's
       container and insert an empty element with .tsg-readonly-block over the control. ---- */
.tsg-readonly-wrap { position: relative; }
.tsg-readonly-block {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
}

/* ---- Optional: dim/disable lookup or select chrome when the group is locked ---- */
.tsg-locked .lookup a,
.tsg-locked .lookup button,
.tsg-locked .select2,
.tsg-locked .dropdown,
.tsg-locked .btn {
  pointer-events: none;
  opacity: 0.5;
}

/* ---- Optional: consistent readonly label style (if you want a subtle cue) ---- */
.tsg-readonly-label {
  color: #5f6b78;
  font-weight: 600;
  opacity: 0.9;
}

/* ---- If your theme allows text selection on inputs, this further discourages edits 
(comment out if you want users to be able to copy text) ---- */
.tsg-readonly,
.tsg-readonly-strong {
  user-select: none;
}

/* Make locked inputs clearly greyed */
input.tsg-readonly-strong,
.form-control.tsg-readonly-strong {
  background-color: #f2f4f7 !important;  /* lighter grey fill */
  border-color: #cfd6dd !important;
}

/* Keep the same on focus so it doesn't pop back to white */
input.tsg-readonly-strong:focus,
.form-control.tsg-readonly-strong:focus {
  background-color: #f2f4f7 !important;
  box-shadow: none !important;
}

/* ---- End TSG Form Controls ---- */