/**
 * Modern Minimalist Keycloak Theme
 * Main CSS styles for the custom Keycloak theme
 */

/* ---------- CSS VARIABLES ---------- */
:root {
  /* Color Palette - Dehon Group */
  --primary: #0c93a4;
  --primary-hover: #0c93a4;
  --primary-light: rgba(0, 150, 136, 0.1);
  --secondary: #4DB6AC;
  --secondary-light: rgba(77, 182, 172, 0.1);
  --white: #ffffff;
  --black: #333333;
  --gray-50: #f8f9ff;
  --gray-100: #f4f7ff;
  --gray-200: #e6e9ef;
  --gray-300: #d1d9e6;
  --gray-400: #b6c1e2;
  --gray-500: #909090;
  --gray-600: #686868;
  --gray-700: #4a5568;
  --error: #ff4d4f;
  --success: #52c41a;
  --warning: #faad14;
  --info: #1890ff;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --fs-xs: 0.75rem;
  /* 12px */
  --fs-sm: 0.875rem;
  /* 14px */
  --fs-base: 1rem;
  /* 16px */
  --fs-md: 1.125rem;
  /* 18px */
  --fs-lg: 1.25rem;
  /* 20px */
  --fs-xl: 1.5rem;
  /* 24px */
  --fs-xxl: 1.875rem;
  /* 30px */
  --fs-xxxl: 2.25rem;
  /* 36px */

  /* Spacing */
  --sp-0: 0;
  --sp-1: 0.25rem;
  /* 4px */
  --sp-2: 0.5rem;
  /* 8px */
  --sp-3: 0.75rem;
  /* 12px */
  --sp-4: 1rem;
  /* 16px */
  --sp-5: 1.25rem;
  /* 20px */
  --sp-6: 1.5rem;
  /* 24px */
  --sp-8: 2rem;
  /* 32px */
  --sp-10: 2.5rem;
  /* 40px */
  --sp-12: 3rem;
  /* 48px */
  --sp-16: 4rem;
  /* 64px */

  /* Border Radius */
  --radius-sm: 0.25rem;
  /* 4px */
  --radius-md: 0.5rem;
  /* 8px */
  --radius-lg: 1rem;
  /* 16px */
  --radius-xl: 1.5rem;
  /* 24px */
  --radius-full: 9999px;
  /* Full rounded */

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.07), 0 6px 12px rgba(0, 0, 0, 0.05);
  --shadow-focus: 0 0 0 3px rgba(0, 150, 136, 0.25);

  /* Transitions */
  --trans-short: 150ms ease;
  --trans-normal: 250ms ease;
  --trans-long: 350ms ease;

  /* Specific dimensions */
  --split-left-width: 40%;
  --login-panel-width: 480px;
}

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--black);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: var(--sp-4);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: var(--fs-xxl);
}

p {
  margin: 0 0 var(--sp-4);
}

#kc-form-options a {
  font-size: 13px;
  margin-left: 230px;
}

a {

  color: var(--primary);
  text-decoration: none;
  transition: color var(--trans-short);
}

a:hover {
  color: var(--primary-hover);
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  color: inherit;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/* ---------- LAYOUT STRUCTURE ---------- */
.split-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.split-container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  width: 100%;
}

/* Left side with background image/graphic */
.split-left {
  width: var(--split-left-width);
  background-color: var(--primary);
  background-color: #023a5d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8);
  position: relative;
  overflow: hidden;
}

/* Decorative circles for left panel */
.split-left::before,
.split-left::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.split-left::before {
  width: 300px;
  height: 300px;
  top: -230px;
  right: -100px;
}

.split-left::after {
  width: 200px;
  height: 200px;
  bottom: -50px;
  left: -50px;
}

/* Brand content in left side */
.brand-wrapper {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  max-width: 480px;
}

.brand-logo {
  max-width: 260px;
  margin: 0 auto var(--sp-6);
  display: block;
}

.brand-title {
  font-size: var(--fs-xxl);
  font-weight: 700;
  margin-bottom: var(--sp-4);
}

.brand-slogan {
  font-size: var(--fs-lg);
  opacity: 0.9;
  margin-bottom: var(--sp-6);
}

/* Right side with the form */
.split-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background-color: var(--white);
}

.login-panel {
  width: 100%;
  max-width: var(--login-panel-width);
  padding: var(--sp-8);
}

.login-title {
  font-size: var(--fs-xxl);
  font-weight: 700;
  margin-bottom: var(--sp-8);
  color: var(--black);
  text-align: center;
  position: relative;
}

.login-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* ---------- FORM ELEMENTS ---------- */
.form-group,
.pf-v5-c-form__group {
  margin-bottom: var(--sp-6);
  position: relative;
}

.form-control,
.pf-v5-c-form-control {
  display: block !important;
  width: 100% !important;
  height: 54px;
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-base);
  color: var(--black);
  background-color: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all var(--trans-normal);
}

.form-control:hover,
.pf-v5-c-form-control:hover {
  border-color: var(--gray-300);
}

.form-control:focus,
.pf-v5-c-form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* Placeholder styling */
.form-control::placeholder,
.pf-v5-c-form-control::placeholder {
  color: var(--gray-500);
  opacity: 0.7;
}

/* Input with error */
.form-control.pf-m-error,
.pf-v5-c-form-control.pf-m-error {
  border-color: var(--error);
}

.form-control.pf-m-error:focus,
.pf-v5-c-form-control.pf-m-error:focus {
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.25);
}

/* Error message */
.pf-v5-c-form__helper-text.pf-m-error,
.pf-v5-c-helper-text.pf-m-error,
#input-error {
  color: var(--error);
  font-size: var(--fs-sm);
  margin-top: var(--sp-2);
  display: block;
}

/* Checkbox styles */
.checkbox {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 28px;
  margin-bottom: var(--sp-4);
  cursor: pointer;
  font-size: var(--fs-sm);
  user-select: none;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  position: absolute;
  top: 2px;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  transition: all var(--trans-short);
}

.checkbox:hover input~.checkbox-custom {
  border-color: var(--gray-400);
}

.checkbox input:checked~.checkbox-custom {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkbox-custom:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox input:checked~.checkbox-custom:after {
  display: block;
}

/* ---------- BUTTONS ---------- */
.btn,
.pf-v5-c-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;

  border-radius: var(--radius-md);
  transition: all var(--trans-normal);
  min-height: 48px;
}

.btn:focus,
.pf-v5-c-button:focus {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* Primary button */
.btn-primary,
.pf-v5-c-button.pf-m-primary {
  color: white;
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(74, 108, 247, 0.2);

  background-image: linear-gradient(to bottom, #023a5d 0, #023a5d 100%);
}

.btn-primary:hover,
.pf-v5-c-button.pf-m-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 108, 247, 0.3);
}

.btn-primary:active,
.pf-v5-c-button.pf-m-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(74, 108, 247, 0.2);
}

/* Secondary button */
.btn-secondary,
.pf-v5-c-button.pf-m-secondary {
  color: var(--primary);
  background-color: var(--white);
  border-color: var(--primary);
}

.btn-secondary:hover,
.pf-v5-c-button.pf-m-secondary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-secondary:active,
.pf-v5-c-button.pf-m-secondary:active {
  transform: translateY(0);
}

/* Link style button */
.btn-link,
.pf-v5-c-button.pf-m-link {
  color: var(--primary);
  background-color: transparent;
  padding: var(--sp-2);
  min-height: auto;
}

.btn-link:hover,
.pf-v5-c-button.pf-m-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Full width button */
.btn-block {
  display: block;
  width: 100%;
}

/* Button with icon */
.btn-icon {
  margin-right: var(--sp-2);
}

/* ---------- ALERTS ---------- */
.pf-v5-c-alert,
.alert,
.message {
  position: relative;
  padding: var(--sp-4);
  margin-bottom: var(--sp-6);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
}

.pf-v5-c-alert.pf-m-success,
.alert-success {
  color: #2e7d32;
  background-color: rgba(82, 196, 26, 0.1);
  border-color: rgba(82, 196, 26, 0.2);
}

.pf-v5-c-alert.pf-m-danger,
.pf-v5-c-alert.pf-m-error,
.alert-error {
  color: #d32f2f;
  background-color: rgba(255, 77, 79, 0.1);
  border-color: rgba(255, 77, 79, 0.2);
}

.pf-v5-c-alert.pf-m-warning,
.alert-warning {
  color: #ed6c02;
  background-color: rgba(250, 173, 20, 0.1);
  border-color: rgba(250, 173, 20, 0.2);
}

.pf-v5-c-alert.pf-m-info,
.alert-info {
  color: #0288d1;
  background-color: rgba(24, 144, 255, 0.1);
  border-color: rgba(24, 144, 255, 0.2);
}

.pf-v5-c-alert__icon {
  margin-right: var(--sp-3);
  font-size: var(--fs-lg);
}

/* ---------- OTHER ELEMENTS ---------- */


/* Social buttons */
.social-providers {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background-color: var(--white);
  color: var(--black);
  font-weight: 500;
  transition: all var(--trans-short);
}

.social-btn:hover {
  background-color: var(--gray-100);
  border-color: var(--gray-300);
  transform: translateY(-2px);
}

.social-btn:active {
  transform: translateY(0);
}

.social-btn-icon {
  margin-right: var(--sp-3);
  font-size: var(--fs-lg);
}

.social-google {
  color: #ea4335;
  border-color: #ea4335;
}

.social-google:hover {
  background-color: rgba(234, 67, 53, 0.05);
}

.social-facebook {
  color: #3b5998;
  border-color: #3b5998;
}

.social-facebook:hover {
  background-color: rgba(59, 89, 152, 0.05);
}

.social-github {
  color: #333333;
  border-color: #333333;
}

.social-github:hover {
  background-color: rgba(51, 51, 51, 0.05);
}

/* Registration option - HIDDEN as requested */
.register-section,
#kc-registration {
  display: none !important;
}

/* ---------- FORM LAYOUT SPECIFIC ---------- */
/* Login form actions (buttons, etc.) */
#kc-form-buttons {
  margin-top: var(--sp-2);
}

/* Username/password layout */
#kc-form-login {
  margin-bottom: var(--sp-4);
}

/* Remember me & forgot password row */
.login-pf-settings {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin: var(--sp-4) 0;
}

/* Try another way */
.pf-v5-c-login__main-footer-links {
  margin-top: var(--sp-4);
  text-align: center;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-panel {
  animation: fadeIn var(--trans-long) forwards;
}

.form-group,
.pf-v5-c-form__group {
  animation: slideUp var(--trans-long) forwards;
  opacity: 0;
}

.form-group:nth-child(1),
.pf-v5-c-form__group:nth-child(1) {
  animation-delay: 100ms;
}

.form-group:nth-child(2),
.pf-v5-c-form__group:nth-child(2) {
  animation-delay: 200ms;
  display: block;
}

.login-pf-settings {
  animation: slideUp var(--trans-long) forwards;
  animation-delay: 300ms;
  opacity: 0;
}

#kc-form-buttons {
  animation: slideUp var(--trans-long) forwards;
  animation-delay: 400ms;
  opacity: 0;
}

.login-options,
.social-providers {
  animation: fadeIn var(--trans-long) forwards;
  animation-delay: 500ms;
  opacity: 0;
}

/* Password related styles */
.password-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-2);
}

.forgot-password {
  font-size: var(--fs-sm);
  color: var(--primary);
  text-decoration: none;
  transition: all var(--trans-short);
  position: relative;
  font-weight: 500;
}

.forgot-password:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

.forgot-password:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-hover);
  transition: width var(--trans-normal);
}

.forgot-password:hover:after {
  width: 100%;
}

/* ---------- RESPONSIVE ADJUSTMENTS ---------- */
@media (max-width: 991px) {
  :root {
    --split-left-width: 35%;
  }

  .login-panel {
    padding: var(--sp-6);
  }

  .brand-wrapper {
    padding: var(--sp-4);
  }

  .brand-title {
    font-size: var(--fs-xl);
  }

  .brand-slogan {
    font-size: var(--fs-base);
  }
}

@media (max-width: 767px) {
  .split-container {
    flex-direction: column;
  }

  .split-left {
    width: 100%;
    height: 180px;
    padding: var(--sp-4);
  }

  .split-right {
    min-height: calc(100vh - 180px);
    padding: var(--sp-4) var(--sp-4) var(--sp-8);
  }

  .brand-logo {
    max-width: 200px;
    height: auto;
    max-height: 80px;
    margin-bottom: var(--sp-3);
    object-fit: contain;
  }

  .brand-title {
    font-size: var(--fs-lg);
    margin-bottom: var(--sp-2);
  }

  .brand-slogan {
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-3);
  }

  .login-panel {
    padding: var(--sp-4);
  }

  .login-title {
    font-size: var(--fs-xl);
    margin-bottom: var(--sp-6);
  }
}

@media (max-width: 479px) {
  .split-left {
    height: 140px;
  }

  .brand-logo {
    max-width: 180px;
    max-height: 60px;
  }

  .login-panel {
    padding: var(--sp-4) var(--sp-2);
  }

  .form-control,
  .pf-v5-c-form-control {
    height: 48px;
    padding: var(--sp-3) var(--sp-4);
  }

  .login-pf-settings {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
  }

  .btn,
  .pf-v5-c-button {
    min-height: 44px;
    padding: var(--sp-2) var(--sp-4);
  }
}

/* Password Recovery Page Styles */
.reset-password-page .login-title {
  margin-bottom: var(--sp-6);
}

.reset-password-page .instruction {
  margin-bottom: var(--sp-6);
  color: var(--gray-700);
  text-align: center;
}

.reset-password-actions {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.reset-password-actions .btn {
  flex: 1;
}

@media (max-width: 479px) {
  .reset-password-actions {
    flex-direction: column;
  }
}


div.kc-logo-text span {
  display: none;
}

.input-group {
  position: relative;
  display: flex;
  border-collapse: separate;
}

