html {
  color: var(--color-text-dark);
  overflow: hidden;
  font-size: var(--font-size);
  font-family: var(--font-family);
  height: 100%;
  line-height: normal !important;
}

html.dragging * {
  user-select: none;
  pointer-events: none;
}

pre.prettyprint {
  text-wrap: wrap;
  word-break: break-word;
}

body {
  height: 100%;
}

/* inline attachment pills */
.attachment {
  display: flex;
  margin-right: 5px;
  font-size: 0;
  white-space: nowrap;
}

.attachment .attachment-preview {
  background-color: #eaeaea;
  border: 0;
  color: #777;
  display: flex;
  font-size: 12px;
  height: 18px;
  padding: 3px 8px;
  text-decoration: none;
  overflow: hidden;
}

.attachment .attachment-download {
  background-color: #e0e0e0;
  border: 0;
  color: #666;
  display: inline-block;
  font-size: 12px;
  padding: 3px;
}

.ReactModalPortal p {
  margin-block-end: 14px;
  margin-block-start: 10px;
  margin-inline-end: 0px;
  margin-inline-start: 0px;
}

.hide {
  display: none;
}

temba-menu > div {
  display: none;
}

.shadow {
  --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 40px 0 rgba(0, 0, 0, 0.09);
}

temba-modax,
temba-dialog {
  --button-y: 0.5em;
}

temba-button {
  --button-shadow: 0 0px 0px 1px rgba(0, 0, 0, 0.02),
    0 1px 9px 0 rgba(0, 0, 0, 0.2);
}

temba-button.light {
  --button-shadow: rgba(0, 0, 0, 0.05) 0px 3px 7px 0px,
    rgba(0, 0, 0, 0.07) 0px 1px 1px 1px;
}

temba-button {
  --button-bg: var(--color-primary-dark);
  --button-text: var(--color-text-light);
  --button-border: none;
  --button-shadow: var(--widget-box-shadow);
}

temba-button:hover {
  --button-bg-img: linear-gradient(
    to bottom,
    rgba(var(--primary-rgb), 0.1),
    transparent,
    transparent
  );
}

temba-button.active {
  --button-bg-img: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.05));
}

temba-button.light {
  --button-bg: #fff;
  --button-text: #999;
  --button-border: none;
  --button-shadow: var(--widget-box-shadow);
}

temba-button.light:hover {
  --button-bg-img: linear-gradient(
    to bottom,
    transparent,
    rgba(0, 0, 0, 0.001)
  );
}

temba-button.light.active {
  --button-bg-img: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.02));
}

temba-select:focus {
  outline: none;
  box-shadow: none;
}

temba-dropdown {
  opacity: 0;
}

temba-dropdown:defined {
  opacity: 1;
}

temba-menu {
  display: none;
}

temba-menu:defined {
  display: block;
}

.list-buttons-container {
  --icon-color: #666;
  margin-left: 1em;
}

.list-buttons-container.visible {
}

.spa-container {
  background: #e9ecf5;
  overflow-y: clip;
  overflow-x: auto;
}

.spa-container.loading .spa-content {
  opacity: 0.3;
  pointer-events: none;
}

.widget-container.loading .spa-loader,
.spa-container.loading .spa-loader {
  display: block;
}

.widget-container.loading .folders,
.widget-container.loading .spa-content,
.widget-container.loading .org-chooser {
  opacity: 0.3;
  pointer-events: none;
}

.org-chooser {
  background: rgba(0, 0, 0, 0.02);
  box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.1) inset;
  color: rgba(0, 0, 0, 0.6);
  --color-widget-border: transparent;
  --color-widget-bg: transparent;
  --temba-select-selected-padding: 0em;
  --color-widget-bg-focused: transparent;
  --color-focus: transparent;
  --widget-box-shadow-focused: transparent;
}

temba-loading {
  z-index: 1000;
}

.title-text {
  transition: opacity 100ms linear;
}

.loading .title-text {
  opacity: 0;
}

.spa-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  transition: opacity 200ms linear;
}

.bg-gradient {
  background-repeat: no-repeat;
  background-image: linear-gradient(
    rgb(255, 255, 255) 0%,
    rgb(231, 235, 247) 75%
  );
}

.lp-frame .lp-nav-item {
  padding: 5px 10px !important;
  border-radius: var(--curvature);
}

.lp-frame .lp-nav-item.selected {
  background: var(--color-selection);
  color: var(--color-primary-dark) !important;
}

.lp-frame {
  margin-top: 0px;
  padding-top: 0em;
  padding-right: 0em;
  padding-left: 0em;
  flex-grow: 1;
  overflow-y: auto;
}

.lp-frame .left {
  padding-top: 1em;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 1em;
  padding-left: 0.1em;
  margin-right: 0em;
  width: 18em;
  padding-bottom: 1em;
}

.lp-frame .right {
  padding: 0em;
  margin: 0em;
}

.lp-frame .left .lp-nav .inner-scroll {
  overflow: inherit;
  height: inherit;
  max-height: inherit;
}

.object-list {
  -webkit-transform: translate3d(0, 0, 0);
}

.button-action {
  background: #fff;
}

#gear-container .button-light {
  padding-top: 0.62em;
  padding-bottom: 0.62em;
  margin-top: 4px;
  background: #fff;
}

#gear-container .button-light.dropdown-toggle {
  padding-top: 0.58em;
  padding-bottom: 0.58em;
  margin-top: 4px;
  background: #fff;
}

.spa-container {
  height: 100%;
}

table.list.selectable tbody tr:hover td {
  background-color: var(--color-row-hover);
  cursor: pointer;
}

.page-title {
  font-size: 1.5em;
}

temba-menu {
  background: #fff;
  border-right: 1px solid #e3e7f2;
}

.formax .formax-section.open {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.servicing:hover .hover {
  background: rgba(0, 0, 0, 0.2);
}

.spa-content {
  overflow-y: auto;
  overflow-x: hidden;
}

.input {
  border-radius: var(--curvature-widget);
  cursor: text;
  background: var(--color-widget-bg);
  border: 1px solid var(--color-widget-border);
  transition: all ease-in-out 200ms;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  box-shadow: var(--widget-box-shadow);
  caret-color: var(--input-caret);
  padding: var(--temba-textinput-padding);
}

.input:focus {
  outline: none;
  border-color: var(--color-focus);
  background: var(--color-widget-bg-focused);
  box-shadow: var(--widget-box-shadow-focused);
}

#error-dialog {
  display: none;
}

/* ===================== Grasp in-app shell ===================== */

/* spectrum hairline across the top of the content column */
.spa-container::before {
  content: '';
  display: block;
  flex-shrink: 0;
  height: 3px;
  background: linear-gradient(90deg, #00acd5 0 25%, #2f9660 25% 50%, #c8a24a 50% 75%, #8f9ae0 75%);
}

/* the band bleeds to the column edges; the column itself provides no top
   padding so the band is never clipped by the scroll container */
.spa-content {
  padding-top: 0;
}

/* page band: brand gradient header with graph-paper overlay and serif title.
   The band is a flex child of the .spa-content column: flex-shrink 0 stops it
   being compressed when the page content (e.g. a long message table)
   overflows — that compression is what clipped titles on data-heavy pages. */
.gse-band {
  position: relative;
  flex-shrink: 0;
  margin: 0 -1.25rem 1.5rem;
  padding: 24px 20px 18px;
  background: linear-gradient(150deg, #f2f4fc 0%, #e6ebf8 55%, #dde6f6 100%);
  border-bottom: 1px solid #d9ddeb;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.gse-band .no-menu {
  min-height: 2.5em;
}

.gse-band::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.7;
  background-image:
    linear-gradient(to right, rgba(26, 34, 51, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 34, 51, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 42%, #000 20%, transparent 76%);
  mask-image: radial-gradient(ellipse at 60% 42%, #000 20%, transparent 76%);
}

.gse-band > * {
  position: relative;
}

.gse-band .text-container {
  font-family: var(--font-display, 'Source Serif 4', Georgia, serif);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.012em;
  color: #1a2233;
}

/* keep the flex-grow spacer (it right-aligns the page actions) but hide its rule */
.gse-band .line > div {
  display: none;
}

.gse-band .text-lg {
  font-size: 14px;
  color: #545e78;
}

/* cards + formax sections follow the Grasp surface */
.card,
.formax .formax-section {
  border-radius: 10px;
  border: 1px solid #d9ddeb;
  --tw-shadow: 0 1px 3px rgba(20, 27, 63, 0.1);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.card.link:hover,
.formax .formax-section:hover {
  box-shadow: 0 12px 30px rgba(20, 27, 63, 0.18);
}

/* tables: indigo-tint header, calm borders, sunken hover */
table.list th {
  background-color: #e7eaf7;
  color: #232f73;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-color: #d9ddeb;
}

table.list,
table.list.lined td {
  border-color: #d9ddeb;
}

table.list {
  border-radius: 10px;
  --tw-shadow: 0 1px 3px rgba(20, 27, 63, 0.1);
}

/* footer sits quietly on the canvas */
.spa-footer {
  background: transparent !important;
  font-size: 12px;
  color: #848da6 !important;
}

/* fragments loaded into modals keep a plain header */
.modax-body .gse-band {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.modax-body .gse-band::before {
  display: none;
}

/* ---- full-palette accents ---- */

/* gold dash + section eyebrow above every page title */
.gse-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #7a5f1e;
}

.gse-eyebrow-dash {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: #c8a24a;
  flex-shrink: 0;
}

.gse-band .text-lg {
  max-width: 70ch;
}

/* checked table rows carry the gold tint */
table.list.selectable tbody tr.checked td {
  background: #f5eedc !important;
  border-color: #eaddba !important;
}

/* formax section icon strip: indigo tint */
.formax .formax-section .formax-icon {
  background-color: #e7eaf7;
  color: #34459e;
  --icon-color: #34459e;
}

/* tab panes drop their inline 1px box (borders come from the injected sheet) */
temba-tabs {
  --temba-tabs-border-top: none;
  --temba-tabs-border-left: none;
  --temba-tabs-border-right: none;
  --temba-tabs-border-bottom: none;
  --tabs-shadow: none;
}
