/* Login Card Design System CSS - matches Figma design */

/* CSS Variables matching the design system */
:root {
  /* Base colors */
  --base-card: white;
  --base-foreground: #18181B;
  --base-sidebar-border: #E4E4E7;
  --base-border: #D4D4D8;
  --base-input: white;
  --base-muted-foreground: #71717A;
  --base-primary: #0048FF;
  --base-primary-foreground: white;

  /* Typography - Make Geist the global font */
  --font-geist: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family: var(--font-geist);
}

/* Login Card Container */
.login-card {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Card Container - matches Keycloak rounded-xl sm:rounded-2xl */
.card-container {
  width: 100%;
  background: var(--base-card);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--base-border);
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  display: inline-flex;
}

@media (min-width: 640px) {
  .card-container {
    border-radius: 1rem;
  }
}

/* Card Header - matches p-3 sm:p-5 md:p-7 */
.card-header {
  align-self: stretch;
  padding: 0.75rem;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0;
  display: flex;
}

@media (min-width: 640px) {
  .card-header {
    padding: 1.25rem;
  }
}

@media (min-width: 768px) {
  .card-header {
    padding: 1.75rem;
  }
}

/* Title Section - no margin, title has margin */
.card-title-section {
  align-self: stretch;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0;
  display: flex;
  margin-bottom: 0;
}

/* Card Title - now using Tailwind: text-xl font-semibold sm:text-2xl mb-3 sm:mb-5 text-foreground leading-tight */

/* Card Description - matches text-xs sm:text-base font-medium mb-3 */
.card-description {
  align-self: stretch;
  color: var(--base-foreground);
  font-size: 0.75rem;
  font-family: var(--font-geist);
  line-height: 1rem;
  word-wrap: break-word;
  margin: 0;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .card-description {
    font-size: 1rem;
    line-height: 1.5rem;
  }
}

/* Form Section - matches space-y-3 sm:space-y-4 md:space-y-5 */
.form-section {
  align-self: stretch;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.75rem;
  display: flex;
}

@media (min-width: 640px) {
  .form-section {
    gap: 1rem;
  }
}

@media (min-width: 768px) {
  .form-section {
    gap: 1.25rem;
  }
}

/* Form Field - matches space-y-2 */
.form-field {
  align-self: stretch;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  display: flex;
}

/* Field Label */
.field-label {
  color: var(--base-foreground);
  font-size: 14px;
  font-family: var(--font-geist);
  font-weight: 500;
  line-height: 14px;
  word-wrap: break-word;
}

/* Field Wrapper - matches space-y-2 */
.field-wrapper {
  align-self: stretch;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.5rem;
  display: flex;
}

/* Field Input - matches h-9 sm:h-9 md:h-8 */
.field-input {
  align-self: stretch;
  height: 2.25rem;
  padding: 0.25rem 0.75rem;
  background: var(--base-input);
  overflow: hidden;
  border-radius: 0.375rem;
  border: 1px solid var(--base-border);
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  display: inline-flex;
  color: var(--base-foreground);
  font-size: 1rem;
  font-family: var(--font-geist);
  font-weight: 400;
  line-height: 1.5;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .field-input {
    height: 2rem;
    font-size: 0.875rem;
  }
}

.field-input::placeholder {
  color: var(--base-muted-foreground);
}

.field-input:focus {
  border-color: var(--base-primary);
  outline: none;
  box-shadow: 0 0 0 0.125rem rgba(0, 72, 255, 0.25);
}

/* Continue Button - matches h-11 sm:h-10 md:h-9 */
.continue-button {
  align-self: stretch;
  height: 36px;
  padding: 8px 16px;
  background: var(--base-primary);
  border-radius: 0.375rem;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  display: inline-flex;
  border: none;
  cursor: pointer;
  color: var(--base-primary-foreground);
  font-size: 0.875rem;
  font-family: var(--font-geist);
  font-weight: 500;
  line-height: 1.5;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
  .continue-button {
    height: 2.5rem;
  }
}

@media (min-width: 768px) {
  .continue-button {
    height: 2.25rem;
  }
}

.continue-button:hover {
  background: color-mix(in srgb, var(--base-primary) 90%, black);
}

.continue-button:focus {
  outline: none;
  box-shadow: 0 0 0 0.125rem rgba(0, 72, 255, 0.25);
}

/* Password Login Button - Orange like other auth methods */
.continue-button.password-login {
  background: var(--base-primary);
  color: #000;
}

.continue-button.password-login:hover {
    background: color-mix(in srgb, var(--base-primary) 90%, black);
}

.continue-button.password-login:focus {
  outline: none;
}

/* Button Icon */
.button-icon {
  width: 16px;
  height: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card Divider */
.card-divider {
  align-self: stretch;
  height: 0px;
  outline: 1px var(--base-border) solid;
  outline-offset: -0.5px;
}

/* Card Footer */
.card-footer {
  align-self: stretch;
  padding: 16px;
  background: hsl(var(--accent));
  justify-content: center;
  align-items: center;
  gap: 8px;
  display: inline-flex;
}

/* Footer Logo */
.footer-logo {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bauhub Logo - Black version */
.bauhub-logo-black {
  height: 16px;
  width: auto;
  filter: brightness(0) saturate(100%); /* Makes any logo black */
}

/* Footer "by" text */
.footer-by {
  color: var(--base-muted-foreground);
  font-size: 12px;
  font-family: var(--font-geist);
  font-weight: 400;
  line-height: 16px;
}

/* Footer Admicom Logo */
.footer-admicom {
  overflow: hidden;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  display: flex;
}

/* Bauhub Logo */
.bauhub-logo {
  height: 16px;
  width: auto;
}

/* Admicom Logo */
.admicom-logo {
  height: 12px;
  width: auto;
}

/* Error Messages */
.error-messages {
  align-self: stretch;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  display: flex;
}

.error-text {
  color: #dc2626;
  font-size: 14px;
  font-family: var(--font-geist);
  font-weight: 400;
  line-height: 20px;
  margin: 0;
}

/* SSO Warning */
.sso-warning {
  align-self: stretch;
  padding: 8px 12px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  color: #92400e;
  font-size: 14px;
  font-family: var(--font-geist);
  font-weight: 400;
  line-height: 20px;
}

/* Select dropdown styling */
select.field-input {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 6L8 10L12 6" stroke="%2371717A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 32px;
}

/* Info Banner - New Footer Design */
.info-banner {
  width: 100%;
  max-width: 1440px;
  padding: 12px 24px;
  left: 0px;
  top: 0px;
  position: fixed;
  bottom: 0;
  background: var(--base-card, white);
  box-shadow: 0px 8px 10px -6px rgba(0, 0, 0, 0.10);
  overflow: hidden;
  justify-content: center;
  align-items: center;
  gap: 24px;
  display: inline-flex;
  z-index: 50;
}

.info-banner-icon {
  width: 24px;
  height: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-container {
  width: 21px;
  height: 21px;
  background: var(--Default-Gray-100, #161616);
  border: 1px var(--base-focus-border, #0048FF) solid;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-banner-content {
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  display: inline-flex;
}

.info-banner-title {
  align-self: stretch;
  color: var(--base-foreground, #18181B);
  font-size: 16px;
  font-family: var(--font-geist);
  font-weight: 500;
  line-height: 24px;
  word-wrap: break-word;
}

.info-banner-description {
  align-self: stretch;
  color: var(--base-muted-foreground, #71717A);
  font-size: 14px;
  font-family: var(--font-geist);
  font-weight: 400;
  line-height: 20px;
  word-wrap: break-word;
}

.info-banner-dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dismiss-button {
  height: 24px;
  padding: 4px 8px;
  background: var(--base-secondary, #F4F4F5);
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  display: flex;
  border: none;
  cursor: pointer;
}

.dismiss-button:hover {
  background: var(--base-secondary-hover, #e4e4e7);
}

.dismiss-icon {
  width: 12px;
  height: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Checkbox styling - override label-input-container styles for checkboxes */
.label-input-container input[type="checkbox"] {
  display: inline-block !important;
  width: auto !important;
  margin-right: 8px;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}

.label-input-container input[type="checkbox"] + label {
  display: inline !important;
  margin-bottom: 0 !important;
  font-weight: normal !important;
  cursor: pointer;
}

/* Back button for step 2 - matches h-11 sm:h-10 md:h-9 secondary button */
.back-button {
  align-self: flex-start;
  height: 2.75rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--base-border);
  border-radius: 0.375rem;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  display: inline-flex;
  cursor: pointer;
  color: var(--base-foreground);
  font-size: 0.875rem;
  font-family: var(--font-geist);
  font-weight: 500;
  margin-bottom: 1rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
  .back-button {
    height: 2.5rem;
  }
}

@media (min-width: 768px) {
  .back-button {
    height: 2.25rem;
  }
}

.back-button:hover {
  background: var(--base-secondary, #F4F4F5);
}

/* Loading state for continue button */
.continue-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--base-muted, #71717A);
}

.continue-button:disabled:hover {
  background: var(--base-muted, #71717A);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .card-container {
    max-width: 100%;
    margin: 0;
  }

  .login-card {
    padding: 0;
  }

  .info-banner {
    max-width: 100%;
    padding: 12px 16px;
    gap: 16px;
  }

  .info-banner-title {
    font-size: 14px;
    line-height: 20px;
  }

  .info-banner-description {
    font-size: 12px;
    line-height: 16px;
  }
}