/* RobotX IDP — small overrides on top of Bulma. Keep this file thin. */

/* Brand: replace Bulma's default teal primary with the RobotX logo orange (#ff6318),
   and shift Bulma's pinkish danger to a cleaner red for destructive actions
   (Sign out, etc.). Bulma derives hover/active/inverted shades from H/S/L. */
:root {
  --bulma-primary-h: 17deg;
  --bulma-primary-s: 100%;
  --bulma-primary-l: 55%;

  --bulma-danger-h: 0deg;
  --bulma-danger-s: 73%;
  --bulma-danger-l: 51%;
}

body {
  background:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url('/images/ocean-bg.jpg') center/cover no-repeat fixed;
  min-height: 100vh;
}

/* Bulma 1.0 zeroes a title's margin-bottom when followed by a subtitle
   (via :has). Give every title a little breathing room instead. */
.title:not(.is-spaced):has(+ .subtitle) {
  margin-bottom: 0.75rem;
}

.idp-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.idp-card {
  width: 100%;
  max-width: 28rem;
}

.idp-card.is-wide {
  max-width: 36rem;
}

.idp-card.is-extra-wide {
  max-width: 60rem;
}

/* Soften Bulma's .box for the login-flow cards: bigger radius, gentler
   shadow, more breathing room, slight translucency so the ocean shows
   through subtly. */
.idp-card.box {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 3rem 3.25rem;
}

@media (max-width: 480px) {
  .idp-card.box {
    padding: 2rem 1.5rem;
  }
}

.idp-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.idp-logo {
  width: 200px;
  height: auto;
  display: inline-block;
}

.idp-brand-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0.5rem 0 0;
}

/* Override Bulma's .button when used as an org picker — we want a light,
   outlined card-style row instead of a heavy filled button. */
.idp-org-button.button {
  width: 100%;
  height: auto;
  justify-content: flex-start;
  text-align: left;
  padding: 0.875rem 1.125rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a2e;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  white-space: normal;
}

.idp-org-button.button:hover {
  background: #f1f5f9;
  border-color: #3b82f6;
  color: #1a1a2e;
}

.idp-org-button.button:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-color: #3b82f6;
}

/* Right-align the cell + Active tags inside each picker row. The button is a
   flex container (Bulma sets .button to inline-flex with justify-content:
   flex-start), so giving the org name flex:1 makes it consume all leftover
   width, pushing the tag(s) flush against the right edge. A small gap sits
   between adjacent tags when both render. */
.idp-org-button.button > .idp-org-name {
  flex: 1 1 auto;
}

.idp-org-button.button > .tag + .tag {
  margin-left: 0.4rem;
}

.idp-org-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.idp-app-list {
  list-style: disc inside;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
}

.idp-app-list li {
  padding: 0.125rem 0;
}

/* Denied orgs section: same shape as granted, but visibly disabled. */
.idp-denied-section {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.idp-denied-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin: 0 0 0.5rem;
}

.idp-denied-intro {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.idp-denied-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.idp-denied-list li {
  padding: 0.875rem 1.125rem;
  font-size: 0.95rem;
  color: #94a3b8;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
}

.idp-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.idp-claim-row.is-org { background-color: #ecfdf5; }
.idp-claim-row.is-internal { background-color: #fefce8; }

/* Microsoft brand-compliant sign-in button: keep the official lockup SVG
   intact and treat the anchor as a transparent click target. */
.ms-signin {
  display: inline-block;
  line-height: 0;
  border-radius: 4px;
  transition: opacity 0.15s ease;
}

.ms-signin img {
  display: block;
  height: 41px;
  width: auto;
}

.ms-signin:hover { opacity: 0.85; }
.ms-signin:focus-visible { outline: 2px solid #1a1a2e; outline-offset: 2px; }
