/* SubjectLine.com Keycloak Login Theme */

:root {
    --primary-color: #4a5aba;
    --primary-hover: #3d4d9e;
    --btn-color: #f5f020;
    --btn-hover: #e6e11c;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --bg-page: #f8f9fc;
    --bg-card: #ffffff;
    --radius: 20px;
    --input-radius: 28px;
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg-page);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#kc-header {
    display: none;
}

#kc-content {
    width: 100%;
}

.login-pf-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

#kc-form-wrapper,
#kc-form {
    width: 100%;
}

/* Card with hot pink gradient left border */
.card-pf {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 44px;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    border: none;
}


/* Header */
#kc-page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* Social login buttons */
#kc-social-providers {
    margin-bottom: 0;
}

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

#kc-social-providers li {
    margin-bottom: 0;
}

#kc-social-providers a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--input-radius);
    background: #fff;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

#kc-social-providers a:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Google icon styling */
.google-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Divider */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 28px 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.separator::before {
    margin-right: 16px;
}

.separator::after {
    margin-left: 16px;
}

/* Form groups */
.form-group {
    margin-bottom: 24px;
}

.form-group label,
.control-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
#kc-form-login input[type="text"],
#kc-form-login input[type="password"] {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--input-radius);
    font-size: 15px;
    color: var(--text-primary);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-group input:focus,
#kc-form-login input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 90, 186, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Password row with forgot link */
.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.password-label-row label {
    margin-bottom: 0;
}

.forgot-password-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* Remember me checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    margin-top: 4px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
    border-radius: 4px;
}

.checkbox-wrapper label {
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 0;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
}

/* Submit button - YELLOW */
#kc-login,
.btn-primary,
input[type="submit"].btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: var(--btn-color);
    color: var(--text-primary);
    border: none;
    border-radius: var(--input-radius);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    margin-top: 4px;
    letter-spacing: 0.2px;
}

#kc-login:hover,
.btn-primary:hover,
input[type="submit"].btn-primary:hover {
    background: var(--btn-hover);
    box-shadow: 0 4px 12px rgba(245, 240, 32, 0.4);
}

#kc-login:active,
.btn-primary:active {
    transform: scale(0.98);
}

/* Registration link */
#kc-registration {
    text-align: center;
    margin-top: 28px;
    padding-top: 0;
    border-top: none;
}

#kc-registration span {
    font-size: 15px;
    color: var(--text-secondary);
}

#kc-registration a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

#kc-registration a:hover {
    text-decoration: underline;
}

/* Alerts / Error messages */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-error,
.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    color: #d97706;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

/* Info section at bottom */
#kc-info {
    text-align: center;
    margin-top: 16px;
}

#kc-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

#kc-info a:hover {
    text-decoration: underline;
}

/* Hide default keycloak elements we don't need */
#kc-header-wrapper {
    display: none;
}

#kc-locale {
    display: none;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-secondary);
}

.login-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .card-pf {
        padding: 32px 24px;
        margin: 0 12px;
    }

    #kc-page-title {
        font-size: 22px;
    }
}

/* Override keycloak defaults */
.login-pf body {
    background: var(--bg-page);
}

.login-pf .container {
    padding: 0;
}

.login-pf .card-pf {
    border-top: none;
}

#kc-content-wrapper {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

/* Logo */
.brand-logo {
    text-align: center;
    margin-bottom: 28px;
    display: none;
}

.brand-logo img {
    height: 32px;
}

.brand-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-logo .logo-text span {
    color: var(--primary-color);
}

/* Legal disclaimer text */
.legal-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.legal-text a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

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

/* Tooltip / helper text */
.instruction {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}
