/* HCCC Brand Colors */
:root {
  --hccc-teal: #00857a;
  --hccc-deep-blue: #2b3990;
  --hccc-light-teal: #CCE7E4;
  --hccc-yellow: #fff200;
  --hccc-orange: #f47000;
  --hccc-white: #ffffff;
  --hccc-text-primary: #333333;
  --hccc-text-secondary: #666666;
  --hccc-border: #e0e0e0;
}

/* Import Montserrat font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* Base styling */
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--hccc-text-primary);
}

/* Background */
.login-pf body {
  background: #f4f7f6;
}

/* Login container */
.login-pf-page {
  padding-top: 60px;
}

/* Logo styling - Inside card layout */
#kc-header {
  background: none;
  padding: 0;
  margin: 0 0 20px 0;
}

#kc-header-wrapper {
  margin-bottom: 15px;
  text-align: center;
}

.kc-logo-text {
  background-image: url('../img/hccc-logo.svg');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  height: 70px;
  width: 70px;
  display: inline-block;
  text-indent: -9999px;
  margin: 0 auto;
}

/* Card styling - HCCC Brand: clean, professional, institutional */
#kc-content {
  background: var(--hccc-white);
  padding: 40px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--hccc-teal);
  border-top: 4px solid var(--hccc-teal);
  max-width: 450px;
  width: 100%;
  margin: 0 auto;
}

/* Headers */
#kc-page-title {
  color: var(--hccc-deep-blue);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
}

/* Form styling */
.form-group {
  margin-bottom: 20px;
}

/* Labels */
.control-label,
label {
  color: var(--hccc-text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 8px;
  display: block;
}

/* Input fields */
input[type="text"],
input[type="password"],
input[type="email"],
.form-control,
#username,
#password {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--hccc-border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.3s ease;
  background-color: var(--hccc-white);
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
.form-control:focus,
#username:focus,
#password:focus {
  outline: none;
  border-color: var(--hccc-teal);
  box-shadow: 0 0 0 3px rgba(0, 133, 122, 0.1);
}

/* Primary button (Login) */
#kc-login,
input[type="submit"] {
  background-color: var(--hccc-teal);
  border: none;
  color: var(--hccc-white);
  padding: 14px 30px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 25px;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Montserrat', sans-serif;
}

#kc-login:hover,
input[type="submit"]:hover {
  background-color: #006b5f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 133, 122, 0.3);
}

#kc-login:active,
input[type="submit"]:active {
  transform: translateY(0);
}

/* Remember me checkbox */
.checkbox {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.checkbox label {
  margin-left: 8px;
  font-weight: 400;
  color: var(--hccc-text-secondary);
  cursor: pointer;
  margin-bottom: 0;
}

/* Form options */
#kc-form-options {
  margin-bottom: 20px;
}

/* Links */
a {
  color: var(--hccc-teal);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--hccc-deep-blue);
  text-decoration: underline;
}

/* Registration link */
#kc-registration {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hccc-border);
}

/* Error messages */
.alert {
  padding: 12px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.875rem;
}

.alert-error,
.alert-danger {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

/* Social login section */
#kc-social-providers {
  margin-top: 30px;
  padding-top: 20px;
}

.kc-social-section {
  text-align: center;
}

.kc-social-provider-name,
.kc-social-link {
  background-color: #f5f5f5;
  color: var(--hccc-text-primary);
  padding: 12px 20px;
  border-radius: 25px;
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 10px;
  border: 1px solid var(--hccc-border);
}

.kc-social-provider-name:hover,
.kc-social-link:hover {
  background-color: var(--hccc-light-teal);
  transform: translateY(-2px);
  text-decoration: none;
  border-color: var(--hccc-teal);
}

/* Language selector */
#kc-locale {
  position: absolute;
  top: 20px;
  right: 20px;
}

#kc-locale-dropdown {
  background: var(--hccc-white);
  border: 1px solid var(--hccc-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.875rem;
}

/* Info section */
#kc-info {
  margin-top: 30px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--hccc-text-secondary);
}

/* Responsive design */
@media (max-width: 768px) {
  .login-pf-page {
    padding: 20px;
  }

  #kc-content {
    padding: 30px 20px;
    box-shadow: none;
    border-radius: 0;
  }

  #kc-page-title {
    font-size: 1.5rem;
  }

  .kc-logo-text {
    width: 250px;
    height: 60px;
  }

  #kc-locale {
    position: static;
    text-align: center;
    margin-bottom: 20px;
  }
}

/* Additional form elements */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Loading spinner */
.kc-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.kc-loading::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid var(--hccc-light-teal);
  border-top-color: var(--hccc-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Card hover effect - subtle, professional */
#kc-content:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s ease;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid var(--hccc-teal);
  outline-offset: 2px;
}

/* Hide elements that shouldn't show */
.kc-feedback-text {
  display: none;
}

/* Form button group */
#kc-form-buttons {
  margin-top: 30px;
}

/* Password visibility toggle */
.pf-c-button.pf-m-control {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--hccc-text-secondary);
  cursor: pointer;
  padding: 8px;
}

.pf-c-button.pf-m-control:hover {
  color: var(--hccc-teal);
}

/* Input group for password field */
.pf-c-input-group,
.kc-input-group {
  position: relative;
}

/* Back to login link */
#kc-back {
  text-align: center;
  margin-top: 20px;
}

/* Footer copyright */
.login-pf-page-footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: var(--hccc-text-secondary);
  font-size: 0.875rem;
}
