/* ═══════════════════════════════════════════════════════════════
   ACONS Management – Keycloak Login Theme
   Brand: #8B0000 (dark red), #a51c1c (lighter), #6b0000 (darker)
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.acons-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
  min-height: 100vh;
}

/* ── Centered container ── */
.acons-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

/* ── Logo ── */
.acons-logo {
  margin-bottom: 1.5rem;
}

.acons-logo img {
  height: 60px;
  width: auto;
  display: block;
}

/* ── Locale selector ── */
.acons-locale {
  margin-bottom: 1rem;
}

.acons-locale select {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  color: #374151;
  background: #fff;
  cursor: pointer;
}

/* ── Card ── */
.acons-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 400px;
  padding: 2rem;
}

/* ── Page title ── */
.acons-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── Attempted username (re-auth flow) ── */
.acons-attempted-user {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: #374151;
}

.acons-attempted-user a {
  color: #8B0000;
  text-decoration: none;
  font-size: 1.125rem;
}

/* ── Required fields hint ── */
.acons-required-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.acons-required {
  color: #dc2626;
}

/* ── Alert messages ── */
.acons-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
}

.acons-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.acons-alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.acons-alert-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.acons-alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ── Form fields ── */
.acons-field {
  margin-bottom: 1rem;
}

.acons-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

.acons-field input[type="text"],
.acons-field input[type="password"] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #1f2937;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.acons-field input:focus {
  border-color: #8B0000;
  box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.15);
}

/* ── Password field with toggle ── */
.acons-password-wrapper {
  position: relative;
  display: flex;
}

.acons-password-wrapper input {
  flex: 1;
  border-radius: 0.5rem 0 0 0.5rem;
}

.acons-password-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  border: 1px solid #d1d5db;
  border-left: none;
  border-radius: 0 0.5rem 0.5rem 0;
  background: #f9fafb;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.875rem;
}

.acons-password-toggle:hover {
  background: #f3f4f6;
  color: #374151;
}

/* ── Error messages under fields ── */
.acons-error {
  display: block;
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 0.25rem;
}

/* ── Options row (remember me + forgot password) ── */
.acons-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}

.acons-checkbox {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #374151;
  cursor: pointer;
}

.acons-checkbox input {
  accent-color: #8B0000;
}

/* ── Links ── */
.acons-link,
a {
  color: #8B0000;
  text-decoration: none;
  font-size: 0.8125rem;
}

.acons-link:hover,
a:hover {
  color: #a51c1c;
  text-decoration: underline;
}

/* ── Primary button ── */
.acons-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: #8B0000;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s;
}

.acons-btn:hover {
  background: #a51c1c;
}

.acons-btn:focus {
  background: #6b0000;
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.25);
}

/* ── Info section (registration link) ── */
.acons-info {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #6b7280;
}

.acons-register {
  text-align: center;
}

/* ── Social providers ── */
.acons-social {
  margin-top: 1.25rem;
}

.acons-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

.acons-divider::before,
.acons-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.acons-social-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.acons-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #374151;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: background-color 0.15s;
}

.acons-social-btn:hover {
  background: #f9fafb;
  color: #374151;
  text-decoration: none;
}

/* ── PatternFly overrides (required actions: update-profile, etc.) ── */
.acons-card .form-group {
  margin-bottom: 1rem;
}

.acons-card .form-group > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #dc2626;
  margin-bottom: 0.375rem;
}

.acons-card .pf-c-form__label,
.acons-card .pf-c-form__label-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
}

.acons-card .pf-c-form-control {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #1f2937;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.acons-card .pf-c-form-control:focus {
  border-color: #8B0000;
  box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.15);
}

.acons-card .pf-c-form__helper-text.pf-m-error {
  display: block;
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 0.25rem;
}

.acons-card .pf-c-button.pf-m-primary {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: #8B0000;
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s;
  margin-top: 0.5rem;
}

.acons-card .pf-c-button.pf-m-primary:hover {
  background: #a51c1c;
}

.acons-card .pf-c-button.pf-m-primary:focus {
  background: #6b0000;
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.25);
}
