/* TurtleNet UX iteration 4 — single-owner workflow guidance, build focus, and commerce entry. */

/* The environment belongs in Dev/Account context, not the primary product chrome. */
#environmentBadge {
  display: none !important;
}

/* Trial tail should read as part of the account control and share its physical height. */
.top-actions .trial-badge {
  min-height: 38px;
  height: 38px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px !important;
  cursor: pointer;
  user-select: none;
}

.top-actions .trial-badge:focus-visible,
.top-actions .trial-badge:hover {
  outline: none;
  filter: brightness(1.12);
  border-color: rgba(231, 190, 104, .7) !important;
}

/* The old scripts still maintain their diagnostic text internally. Hide that competing
   renderer and expose one stable workflow line owned by iteration 4. */
#progressText.ux4-legacy-workflow-message {
  display: none !important;
}

#ux4WorkflowMessage {
  color: #93a4ad;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ux4WorkflowMessage.error {
  color: #ef9da7;
}

#ux4WorkflowMessage.active {
  color: #b9d7df;
}

/* The old amber dot is too weak and is clipped in the command bar. Build-map guidance
   gets a dedicated focus treatment instead. */
#discoverButton.workflow-guide-pulse::after,
#discoverButton.ux3-next-action::after {
  display: none !important;
}

.ux4-build-focus-ring {
  position: fixed;
  z-index: 520;
  border: 2px solid rgba(143, 224, 190, .96);
  border-radius: 8px;
  background: transparent;
  box-shadow:
    0 0 0 9999px rgba(1, 4, 6, .82),
    0 0 0 5px rgba(98, 194, 156, .16),
    0 0 26px rgba(98, 194, 156, .48),
    0 0 72px rgba(98, 194, 156, .22);
  pointer-events: none;
  animation: ux4BuildHalo 1.8s ease-in-out infinite;
}

.ux4-build-focus-callout {
  position: fixed;
  z-index: 525;
  width: min(390px, calc(100vw - 28px));
  padding: 12px 42px 12px 13px;
  border: 1px solid rgba(143, 224, 190, .5);
  background: #14231e;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .56), 0 0 22px rgba(98, 194, 156, .14);
  color: #dff7ec;
  pointer-events: none;
}

.ux4-build-focus-callout strong,
.ux4-build-focus-callout span {
  display: block;
}

.ux4-build-focus-callout strong {
  font-size: .76rem;
  font-weight: 720;
}

.ux4-build-focus-callout span {
  margin-top: 4px;
  color: #91aaa0;
  font-size: .65rem;
  line-height: 1.42;
}

.ux4-build-focus-callout kbd {
  position: absolute;
  top: 11px;
  right: 10px;
  padding: 3px 6px;
  border: 1px solid rgba(171, 189, 199, .35);
  background: rgba(7, 11, 14, .72);
  color: #9baab1;
  font: 600 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

@keyframes ux4BuildHalo {
  0%, 100% { opacity: .78; }
  50% { opacity: 1; }
}

/* Inline build path is intentionally indeterminate: the request owns the complete
   baseline lifecycle and no longer races a second polling request. */
#progressBar.ux4-indeterminate {
  width: 38% !important;
  animation: ux4Indeterminate 1.35s ease-in-out infinite;
}

@keyframes ux4Indeterminate {
  0% { transform: translateX(-115%); }
  50% { transform: translateX(80%); }
  100% { transform: translateX(265%); }
}

/* Subscription / checkout entry in Account. */
.ux4-checkout-entry {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid rgba(170, 188, 198, .13);
}

.ux4-checkout-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ux4-checkout-entry-copy strong,
.ux4-checkout-entry-copy span {
  display: block;
}

.ux4-checkout-entry-copy strong {
  color: #e4edf1;
  font-size: .78rem;
}

.ux4-checkout-entry-copy span {
  margin-top: 3px;
  color: #82939c;
  font-size: .66rem;
}

.ux4-checkout-options {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ux4-checkout-option {
  min-height: 92px;
  padding: 12px;
  text-align: left;
  border: 1px solid rgba(155, 176, 186, .22);
  background: rgba(10, 17, 21, .72);
  color: #dbe5e9;
  cursor: pointer;
}

.ux4-checkout-option:hover,
.ux4-checkout-option:focus-visible {
  outline: none;
  border-color: rgba(112, 195, 216, .55);
  background: rgba(18, 31, 37, .88);
}

.ux4-checkout-option.recommended {
  border-left: 3px solid #68bd99;
}

.ux4-checkout-option strong,
.ux4-checkout-option span,
.ux4-checkout-option small {
  display: block;
}

.ux4-checkout-option strong {
  font-size: .73rem;
}

.ux4-checkout-option span {
  margin-top: 4px;
  color: #9eb0b8;
  font-size: .64rem;
}

.ux4-checkout-option small {
  margin-top: 7px;
  color: #6f818a;
  font-size: .58rem;
  line-height: 1.35;
}

.ux4-provider-tag {
  display: inline-flex !important;
  width: fit-content;
  margin: 0 0 7px !important;
  padding: 2px 6px;
  border: 1px solid rgba(104, 189, 153, .38);
  color: #82d3b0 !important;
  font: 700 8px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .ux4-checkout-entry-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ux4-checkout-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ux4-build-focus-ring,
  #progressBar.ux4-indeterminate {
    animation: none !important;
  }
}
