/* Citadel Web Components - Styles */

citadel-login,
citadel-register,
citadel-forgot-password,
citadel-reset-password {
  display: block;
  max-width: 340px;
  margin: 0 auto;
}

/* Login page component */
citadel-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #1c2a35;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #ececec;
}

.citadel-page-card {
  background: #16222c;
  border: 1px solid #2d4050;
  border-radius: 12px;
  padding: 2rem;
  width: 380px;
}

/* Dark theme for Canvas inputs in citadel components */
.citadel-page-card .canvas-form-input,
citadel-login .canvas-form-input,
citadel-register .canvas-form-input,
citadel-forgot-password .canvas-form-input,
citadel-reset-password .canvas-form-input {
  background: #243442;
  border-color: #2d4050;
  color: #ececec;
}

.citadel-page-card .canvas-form-input:focus,
citadel-login .canvas-form-input:focus,
citadel-register .canvas-form-input:focus,
citadel-forgot-password .canvas-form-input:focus,
citadel-reset-password .canvas-form-input:focus {
  border-color: #3A7CA5;
}

.citadel-page-card .canvas-form-input::placeholder,
citadel-login .canvas-form-input::placeholder,
citadel-register .canvas-form-input::placeholder,
citadel-forgot-password .canvas-form-input::placeholder,
citadel-reset-password .canvas-form-input::placeholder {
  color: #8e8e8e;
}

.citadel-page-card .canvas-form-password-toggle,
citadel-login .canvas-form-password-toggle,
citadel-register .canvas-form-password-toggle,
citadel-forgot-password .canvas-form-password-toggle,
citadel-reset-password .canvas-form-password-toggle {
  color: #8e8e8e;
}

/* Form layout */
.citadel-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Header (icon + name) */
.citadel-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-bottom: 1rem;
}

.citadel-header-logo {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.citadel-header-logo svg {
  width: 100%;
  height: 100%;
}

.citadel-header-logo img.citadel-header-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.citadel-header-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ececec;
  letter-spacing: 0.02em;
}

/* Make canvas-button bigger in citadel forms */
citadel-login canvas-button .canvas-btn,
citadel-register canvas-button .canvas-btn,
citadel-forgot-password canvas-button .canvas-btn,
citadel-reset-password canvas-button .canvas-btn {
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
}

/* Actions row */
.citadel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* Links */
.citadel-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.citadel-links-text {
  color: #8e8e8e;
}

.citadel-links a {
  color: #3A7CA5;
  text-decoration: none;
  cursor: pointer;
}

.citadel-links a:hover {
  text-decoration: underline;
}

/* Divider */
.citadel-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #8e8e8e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.citadel-divider::before,
.citadel-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #2d4050;
}

/* Success message */
.citadel-success {
  text-align: center;
  padding: 1.5rem 0;
  color: #27C93F;
  font-size: 0.875rem;
}

/* Error message */
.citadel-error {
  padding: 0.625rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.citadel-error.visible {
  display: flex;
}

.citadel-error-close {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  opacity: 0.6;
  flex-shrink: 0;
}

.citadel-error-close:hover {
  opacity: 1;
}
