/* Custom Login Theme Styles - Skill-Wanderer Dark-First Design System */

/* Base font size settings */
html {
    font-size: 16px;
}

/* Override main background – dark with subtle orange/yellow radial glows */
.login-pf body {
    background: #0f0f0f;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 217, 61, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 107, 53, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* Override card – soft-glass surface */
.login-pf .card-pf {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 107, 53, 0.2);
    max-width: 420px;
    margin: 0 auto;
    transition: all 0.3s ease;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-pf .card-pf:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
    border-color: rgba(255, 107, 53, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

/* Header styling */
.login-pf .card-pf header {
    background: transparent;
    border-bottom: none;
    padding: 15px 20px 10px;
    text-align: center;
    border-radius: 16px 16px 0 0;
}

/* Logo/Brand heading – orange-to-yellow gradient text */
.login-pf .card-pf header h1 {
    background: linear-gradient(135deg, #FF6B35, #FFD93D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    text-align: center;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Remove pseudo-elements – replaced by logo img in FTL */
.login-pf .card-pf header::before,
.login-pf .card-pf header::after {
    display: none;
}

/* Font Awesome icon styling */
.fa, .fas, .far, .fal, .fab {
    font-family: "Font Awesome 6 Free", sans-serif;
}

/* Icon specific styling for form elements */
.login-pf .form-control-with-icon {
    position: relative;
}

.login-pf .form-control-with-icon .fa {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.login-pf .form-control-with-icon input {
    padding-left: 45px;
}

/* Form container */
.login-pf .card-pf form {
    padding: 10px 30px 25px;
    background: transparent;
}

/* Logo styling */
.kc-logo-section {
    text-align: center;
    padding: 5px 0;
}

.kc-logo {
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 2px 8px rgba(255, 107, 53, 0.2));
}

/* Input field styling – dark glass inputs */
.login-pf .form-control {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 14px 18px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-family: inherit;
}

.login-pf .form-control:focus {
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
    outline: none;
    background: rgba(255, 255, 255, 0.07);
}

.login-pf .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* Button styling – orange gradient pill buttons */
.login-pf .btn-primary,
.login-pf input[type="submit"],
.login-pf input[name="login"] {
    background: linear-gradient(135deg, #FF6B35, #E85D25);
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.login-pf .btn-primary::before,
.login-pf input[type="submit"]::before,
.login-pf input[name="login"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-pf .btn-primary:hover,
.login-pf input[type="submit"]:hover,
.login-pf input[name="login"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    filter: brightness(1.1);
}

.login-pf .btn-primary:hover::before,
.login-pf input[type="submit"]:hover::before,
.login-pf input[name="login"]:hover::before {
    left: 100%;
}

.login-pf .btn-primary:active,
.login-pf input[type="submit"]:active,
.login-pf input[name="login"]:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* Hyperlinks – brand orange on dark */
.login-pf a,
.login-pf a:link,
.login-pf a:visited {
    color: #FF6B35;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-pf a:hover,
.login-pf a:focus {
    color: #FFD93D;
    text-decoration: underline;
}

.login-pf a:active {
    color: #E85D25;
}

/* Specific styling for forgot password link */
#kc-form-options a {
    color: #FF6B35;
    font-weight: 500;
}

#kc-form-options a:hover {
    color: #FFD93D;
}

/* Registration link styling */
#kc-registration a {
    color: #FF6B35;
    font-weight: 600;
}

#kc-registration a:hover {
    color: #FFD93D;
}

/* Form group spacing */
.login-pf .form-group {
    margin-bottom: 12px;
}

/* Registration form specific adjustments */
body.register .login-pf .card-pf form {
    padding: 8px 25px 20px;
}

body.register .kc-logo-section {
    margin-bottom: 8px;
    padding: 3px 0;
}

body.register .kc-logo {
    max-width: 80px;
}

body.register .login-pf .form-group {
    margin-bottom: 10px;
}

/* Alternative registration form detection */
form[action*="registration"] ~ * .login-pf .card-pf form,
.login-pf .card-pf form:has(input[name="firstName"]) {
    padding: 8px 25px 20px;
}

.login-pf .card-pf form:has(input[name="firstName"]) .kc-logo-section {
    margin-bottom: 8px;
    padding: 3px 0;
}

.login-pf .card-pf form:has(input[name="firstName"]) .kc-logo {
    max-width: 80px;
}

.login-pf .card-pf form:has(input[name="firstName"]) .form-group {
    margin-bottom: 10px;
}

/* Label styling – light text on dark */
.login-pf label {
    color: #e0e0e0;
    font-weight: 500;
    margin-bottom: 10px;
    font-family: inherit;
}

/* Error message styling */
.login-pf .alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ef5350;
    border-radius: 8px;
    padding: 12px 16px;
}

/* Success message styling */
.login-pf .alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #66bb6a;
    border-radius: 8px;
    padding: 12px 16px;
}

/* Footer links – darker glass surface */
.login-pf .card-pf footer {
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 107, 53, 0.1);
    padding: 25px 40px;
    text-align: center;
    border-radius: 0 0 16px 16px;
}

.login-pf .card-pf footer a {
    color: #FF6B35;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.login-pf .card-pf footer a:hover {
    color: #FFD93D;
    text-decoration: underline;
}

/* Remember me checkbox */
.login-pf .checkbox input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #FF6B35;
}

.login-pf .checkbox label {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-pf .card-pf {
        margin: 15px;
        max-width: none;
        border-radius: 12px;
    }
    
    .login-pf .card-pf form {
        padding: 15px 20px 25px;
    }
    
    .login-pf .card-pf header {
        padding: 20px 20px 15px;
    }
    
    .login-pf .card-pf header h1 {
        font-size: 1.5rem;
    }
    
    .login-pf .card-pf footer {
        padding: 15px 20px;
    }
    
    .kc-logo {
        max-width: 80px;
    }
    
    .kc-logo-section {
        padding: 5px 0;
        margin-bottom: 10px;
    }
    
    .login-pf-page {
        padding: 5px;
    }
    
    .login-pf #kc-container {
        padding: 5px;
        align-items: flex-start;
        padding-top: 20px;
    }
}

/* Brand consistency enhancements */
.login-pf #kc-header-wrapper {
    text-align: center;
}

/* Input field enhancements */
.login-pf .form-control::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-pf .form-control::-moz-placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-pf .form-control:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Loading state for button */
.login-pf .btn-primary:disabled,
.login-pf input[type="submit"]:disabled,
.login-pf input[name="login"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Focus states for accessibility */
.login-pf .btn-primary:focus,
.login-pf input[type="submit"]:focus,
.login-pf input[name="login"]:focus {
    outline: 2px solid #FFD93D;
    outline-offset: 2px;
}

.login-pf .form-control:focus {
    outline: none;
}

/* Animation for card entrance */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-pf .card-pf {
    animation: cardFadeIn 0.6s ease-out;
}

/* Additional professional touches */
.login-pf .alert {
    border-radius: 8px;
    padding: 15px 18px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Loading state indicator */
.login-pf .btn-primary.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-pf .btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#kc-container-wrapper {
    bottom: 0%;
}

.login-pf-page {
    padding-top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5px 0;
}

.login-pf-page .login-pf-page-header {
    margin-bottom: 0;
    padding: 5px 0;
}

/* Additional container styling for better centering */
.login-pf #kc-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5px;
    padding-top: 10px;
}

.login-pf #kc-container-wrapper {
    width: 100%;
    max-width: 420px;
}

/* =====================================================
   GLOBAL TEXT COLOR FIX – force light text on dark theme
   ===================================================== */

/* All labels must be light */
.login-pf label,
.login-pf .control-label,
.login-pf .form-group label,
.login-pf .pf-c-form__label-text {
    color: #e0e0e0 !important;
    font-weight: 500;
}

/* Required field asterisks */
.login-pf .required {
    color: #FF6B35 !important;
}

/* General text in card */
.login-pf .card-pf,
.login-pf .card-pf p,
.login-pf .card-pf span,
.login-pf .card-pf div {
    color: #e0e0e0;
}

/* All form inputs on dark background */
.login-pf .form-control,
.login-pf input[type="text"],
.login-pf input[type="password"],
.login-pf input[type="email"] {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #e0e0e0 !important;
    border-radius: 8px;
    padding: 14px 18px;
    transition: all 0.3s ease;
}

.login-pf .form-control:focus,
.login-pf input[type="text"]:focus,
.login-pf input[type="password"]:focus,
.login-pf input[type="email"]:focus {
    border-color: #FF6B35 !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15) !important;
    outline: none;
    background: rgba(255, 255, 255, 0.07) !important;
}

/* Placeholder text */
.login-pf input::-webkit-input-placeholder { color: rgba(255, 255, 255, 0.4) !important; }
.login-pf input::-moz-placeholder { color: rgba(255, 255, 255, 0.4) !important; }
.login-pf input:-ms-input-placeholder { color: rgba(255, 255, 255, 0.4) !important; }

/* All links inside card */
.login-pf .card-pf a,
.login-pf .card-pf a:link,
.login-pf .card-pf a:visited {
    color: #FF6B35 !important;
    font-weight: 500;
}

.login-pf .card-pf a:hover,
.login-pf .card-pf a:focus {
    color: #FFD93D !important;
}

/* Back to Login link */
#kc-form-options a,
.login-pf .card-pf .kc-form-options a {
    color: #FF6B35 !important;
    font-weight: 500;
}

/* Submit / Register button override */
.login-pf .btn-primary,
.login-pf input[type="submit"] {
    background: linear-gradient(135deg, #FF6B35, #E85D25) !important;
    border: none !important;
    border-radius: 50px !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    padding: 15px 30px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-pf .btn-primary:hover,
.login-pf input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    filter: brightness(1.1);
}

/* =====================================================
   SOCIAL PROVIDER BUTTONS FIX
   ===================================================== */

/* Override ALL default Keycloak/zocial social button styles */
#kc-social-providers {
    border-top: 1px solid rgba(255, 107, 53, 0.1);
    padding: 16px 28px;
}

#kc-social-providers h4,
#kc-social-providers .kc-social-section-text {
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 500;
}

#kc-social-providers ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#kc-social-providers li {
    list-style: none !important;
    margin-bottom: 8px;
}

/* Nuclear override for social buttons – override zocial, kc-social-*, etc. */
#kc-social-providers a,
#kc-social-providers a[id^="social-"],
#kc-social-providers a.zocial,
a.social-btn-custom,
.social-btn-custom {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 12px 16px !important;
    text-align: center !important;
    border-radius: 50px !important;
    border: 2px solid #FF6B35 !important;
    background: #262626 !important;
    background-image: none !important;
    color: #e0e0e0 !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.5 !important;
    text-shadow: none !important;
    text-indent: 0 !important;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.15) !important;
    flex-wrap: nowrap !important;
}

#kc-social-providers a:hover,
#kc-social-providers a[id^="social-"]:hover,
#kc-social-providers a.zocial:hover,
.social-btn-custom:hover {
    background: #FF6B35 !important;
    border-color: #FF6B35 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3) !important;
    transform: translateY(-1px);
}

/* Hide zocial font pseudo-element icons */
#kc-social-providers a::before,
#kc-social-providers a.zocial::before {
    display: none !important;
    content: none !important;
}

/* =====================================================
   REGISTRATION PAGE SPECIFIC FIXES
   ===================================================== */

/* Registration form spacing */
#kc-register-form .form-group {
    margin-bottom: 12px;
}

/* Password visibility toggle */
.login-pf .pf-c-button.pf-m-control,
.login-pf .kc-form-password-visibility-toggle {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

.login-pf .pf-c-button.pf-m-control:hover,
.login-pf .kc-form-password-visibility-toggle:hover {
    color: #FF6B35 !important;
}

/* Info/registration footer section */
#kc-info,
.login-pf #kc-info {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Checkbox labels */
.login-pf .checkbox label,
.login-pf input[type="checkbox"] + label {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Fix any select/dropdown if present */
.login-pf select.form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #e0e0e0 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
