/* MinIO embeds its UI. Keep these styles local to the sign-in document. */
#root #loader-block,
#root .mainContainer:has(.formPanel .logoContainer) {
  color-scheme: light;
  --storage-base: #eaf2fc;
  --storage-glow: #c8dff9;
  --storage-panel: #f5f9fe;
  --storage-card: #fff;
  --storage-line: #cddbef;
  --storage-text: #142740;
  --storage-muted: #45607c;
  --storage-field: #f8fafe;
  --storage-field-border: #acbfd7;
  --storage-link: #1357ab;
  --storage-focus: #136ad1;
  --storage-action: #0a57b7;
  --storage-action-hover: #084694;
  --storage-disabled: #e5edf7;
  --storage-disabled-text: #526a82;
  --storage-error: #b52141;
  --storage-shadow: #315b8d21;
  color: var(--storage-text);
  background:
    radial-gradient(ellipse at 12% 14%, var(--storage-glow), transparent 60%),
    var(--storage-base);
}

@media (prefers-color-scheme: dark) {
  #root #loader-block,
  #root .mainContainer:has(.formPanel .logoContainer) {
    color-scheme: dark;
    --storage-base: #0a1424;
    --storage-glow: #152f4c;
    --storage-panel: #0d192a;
    --storage-card: #142237;
    --storage-line: #2d4059;
    --storage-text: #edf5ff;
    --storage-muted: #afc1d8;
    --storage-field: #101c2d;
    --storage-field-border: #526a86;
    --storage-link: #9bd1ff;
    --storage-focus: #79c5fb;
    --storage-action: #1163c8;
    --storage-action-hover: #0e56b0;
    --storage-disabled: #23354b;
    --storage-disabled-text: #9db0c7;
    --storage-error: #ffafbc;
    --storage-shadow: #02071161;
  }
}

#loader-block img {
  width: 60px;
  height: 60px;
  animation: digitalogic-storage-loader 1.7s ease-in-out infinite;
}

@keyframes digitalogic-storage-loader {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

#root .decorationPanel {
  align-content: center;
  padding: clamp(32px, 7vw, 112px);
  box-sizing: border-box;
  background: none;
}

#root .decorationPanel .videoContainer {
  display: none;
}

#root .decorationPanel .promoContainer {
  position: static;
  width: 100%;
  margin: 0;
  padding: 0;
  transform: none;
}

#root .decorationPanel .promoContainer:has(> .digitalogic-storage-intro) > :is(.promoHeader, .promoInfo) {
  display: none;
}

#root .digitalogic-storage-intro h1 {
  width: min(100%, 14ch);
  margin: 0 0 16px;
  color: var(--storage-text);
  font-size: clamp(2rem, 4.5vw, 4.1rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  text-wrap: balance;
  line-height: 1.08;
}

#root .digitalogic-storage-intro p {
  width: min(100%, 42ch);
  margin: 0;
  color: var(--storage-muted);
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.55;
}

#root .mainContainer .formPanel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  padding: clamp(16px, 3vw, 44px);
  box-sizing: border-box;
  color: var(--storage-text);
  background: var(--storage-panel);
  border-inline-start: 1px solid var(--storage-line);
}

#root .formPanel > div:has(> .logoContainer) {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  width: min(100%, 400px);
  height: auto;
  padding: clamp(20px, 3vw, 36px);
  box-sizing: border-box;
  background: var(--storage-card);
  border: 1px solid var(--storage-line);
  border-radius: 22px;
  box-shadow: 0 24px 64px var(--storage-shadow);
}

#root .formPanel .logoContainer {
  flex: 0 0 auto;
  justify-content: flex-start;
  width: 100%;
  height: auto;
  margin: 0 0 26px;
  color: var(--storage-text);
  box-shadow: none;
}

#root .logoContainer > svg[hidden] {
  display: none;
}

.digitalogic-storage-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--storage-text);
  font: 600 clamp(1.15rem, 3vw, 1.55rem)/1.2 Inter, system-ui, sans-serif;
}

.digitalogic-storage-brand img {
  display: block;
  width: 55px;
  max-width: 18vw;
  height: auto;
  flex: 0 0 auto;
}

.digitalogic-storage-brand strong {
  display: block;
  margin-bottom: 5px;
  font-weight: 750;
}

.digitalogic-storage-brand span {
  display: block;
  color: var(--storage-muted);
  font-size: 0.72em;
}

#root .formPanel .formContainer {
  flex: 0 0 auto;
  gap: 20px;
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 0;
  overflow: visible;
}

#root .formPanel .formContainer :is(.form, .footer) {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  height: auto;
}

#root .formPanel .formContainer .footer {
  justify-content: flex-start;
  padding: 16px 0 0;
  color: var(--storage-muted);
  border-top: 1px solid var(--storage-line);
  font-size: 0.82rem;
}

#root .formPanel .footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

#root .formPanel .footer .separator {
  display: none;
}

#root :is(.formPanel, .decorationPanel) a {
  color: var(--storage-link);
  text-underline-offset: 3px;
}

#root :is(.formPanel, .decorationPanel) a:hover {
  text-decoration: underline;
}

#root .formPanel :is(.textBoxContainer, .inputItem, form) {
  overflow: visible;
}

#root .formPanel input.inputRebase {
  box-sizing: border-box;
  height: 46px;
  border: 1px solid var(--storage-field-border);
  border-radius: 9px;
  color: var(--storage-text);
  background: var(--storage-field);
  caret-color: var(--storage-text);
  font-size: 1rem;
  transition-property: background-color, border-color, color;
}

#root .formPanel input.inputRebase::placeholder {
  color: var(--storage-muted);
  font-size: 0.875rem;
}

#root .formPanel .textBoxContainer :is(.startOverlayIcon, .overlayAction) {
  top: 23px;
  color: var(--storage-muted);
  transform: translateY(-50%);
}

#root .formPanel .textBoxContainer .min-icon {
  color: var(--storage-muted);
  fill: currentColor;
}

#root .formPanel .overlayAction button {
  background: var(--storage-field);
  color: var(--storage-muted);
}

#root .formPanel .errorText {
  color: var(--storage-error);
}

#root .formPanel .button-callAction,
#root .formPanel #do-login {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--storage-action);
  color: #fff;
  font-weight: 650;
}

#root .formPanel .button-callAction:not(:disabled):hover,
#root .formPanel #do-login:not(:disabled):hover {
  background: var(--storage-action-hover);
}

#root .formPanel .button-callAction:disabled,
#root .formPanel #do-login:disabled {
  border-color: var(--storage-line);
  background: var(--storage-disabled);
  color: var(--storage-disabled-text);
}

#root :is(.formPanel, .decorationPanel) :is(input, button, a):focus-visible {
  outline: 2px solid var(--storage-focus);
  outline-offset: 1px;
}

#root .formPanel input.inputRebase:focus-visible {
  border-color: var(--storage-focus);
  outline-offset: 0;
  box-shadow: none;
}

@media (max-width: 900px) {
  #root .mainContainer .formPanel {
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #loader-block img { animation: none; }
}
