/* Every rule below is !important. Themes and page builders often ship
   aggressive global styles for form, button, and input elements (e.g. a
   sitewide "circular button" or "flat input" design system) that would
   otherwise silently override this widget's own look. !important on every
   property here is intentional and load-bearing, not accidental. */

.kcfc-auth [hidden],
.kcfc-otp-widget [hidden],
.kcfc-family-page [hidden] {
    display: none !important;
}

.kcfc-auth button,
.kcfc-otp-widget button,
.kcfc-family-page button {
    font-family: inherit !important;
    line-height: normal !important;
    text-indent: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.kcfc-auth button:focus,
.kcfc-auth button:focus-visible,
.kcfc-otp-widget button:focus,
.kcfc-otp-widget button:focus-visible,
.kcfc-family-page button:focus,
.kcfc-family-page button:focus-visible {
    outline: 2px solid #2b6fef !important;
    outline-offset: 1px !important;
}

.kcfc-auth button:active,
.kcfc-otp-widget button:active,
.kcfc-family-page button:active {
    outline: none !important;
}

.kcfc-auth *,
.kcfc-otp-widget *,
.kcfc-family-page * {
    box-sizing: border-box !important;
}

/* ---- Layout ---- */
.kcfc-auth {
    max-width: 420px !important;
    margin: 0 auto !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

.kcfc-card {
    background: #ffffff !important;
    border: 1px solid #e7e9ec !important;
    border-radius: 14px !important;
    padding: 28px 26px !important;
    box-shadow: 0 4px 18px rgba(20, 30, 60, 0.06) !important;
}

.kcfc-logo-wrap {
    text-align: center !important;
    margin-bottom: 20px !important;
}

.kcfc-logo {
    max-height: 56px !important;
    max-width: 220px !important;
}

/* ---- Tabs ---- */
.kcfc-tabs {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 22px !important;
    background: #f3f5f8 !important;
    padding: 4px !important;
    border-radius: 10px !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
}

.kcfc-tab {
    flex: 1 !important;
    width: auto !important;
    height: auto !important;
    padding: 9px 12px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
}

.kcfc-tab.is-active {
    background: #ffffff !important;
    color: #2b6fef !important;
    box-shadow: 0 1px 3px rgba(20, 30, 60, 0.08) !important;
}

.kcfc-tab:hover {
    background: rgba(255, 255, 255, 0.6) !important;
    color: #374151 !important;
}

.kcfc-tab.is-active:hover {
    background: #ffffff !important;
    color: #2b6fef !important;
}

/* ---- Panels / fields ---- */
.kcfc-panel {
    display: flex !important;
    flex-direction: column !important;
}

.kcfc-label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    margin: 14px 0 6px !important;
}

.kcfc-input {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 11px 13px !important;
    margin: 0 !important;
    border: 1.5px solid #e2e5ea !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    background: #fbfbfc !important;
    color: #1f2430 !important;
}

.kcfc-input:focus {
    outline: none !important;
    border-color: #2b6fef !important;
    background: #ffffff !important;
}

.kcfc-error {
    display: block !important;
    color: #d0342c !important;
    font-size: 12px !important;
    min-height: 15px !important;
    margin-top: 4px !important;
    background: none !important;
}

/* ---- Fixed +91 phone prefix ---- */
.kcfc-phone-wrap {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
}

.kcfc-phone-prefix {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 12px !important;
    border: 1.5px solid #e2e5ea !important;
    border-right: none !important;
    border-radius: 9px 0 0 9px !important;
    background: #f3f5f8 !important;
    color: #4b5563 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

.kcfc-phone-input {
    border-radius: 0 9px 9px 0 !important;
}

/* ---- Password show/hide ---- */
.kcfc-password-wrap {
    position: relative !important;
    width: 100% !important;
}

.kcfc-password-wrap .kcfc-input {
    padding-right: 42px !important;
}

.kcfc-eye-btn {
    position: absolute !important;
    top: 50% !important;
    right: 6px !important;
    left: auto !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 6px !important;
    background: transparent !important;
    border: none !important;
    padding: 4px !important;
    margin: 0 !important;
    cursor: pointer !important;
    color: #9aa1ac !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.kcfc-eye-btn:hover {
    color: #4b5563 !important;
    background: #f0f1f3 !important;
}

.kcfc-eye-icon {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}

/* ---- Login-method / forgot-method toggle ---- */
.kcfc-method-toggle {
    display: flex !important;
    gap: 8px !important;
    margin: 16px 0 4px !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

.kcfc-method-btn {
    flex: 1 !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    padding: 9px 8px !important;
    margin: 0 !important;
    border: 1.5px solid #e2e5ea !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    text-overflow: initial !important;
    overflow: visible !important;
}

.kcfc-method-btn.is-active {
    border-color: #2b6fef !important;
    color: #2b6fef !important;
    background: #eef4ff !important;
}

.kcfc-method-btn:hover {
    border-color: #c7ccd4 !important;
    background: #f7f8fa !important;
    color: #4b5563 !important;
}

.kcfc-method-btn.is-active:hover {
    border-color: #2b6fef !important;
    background: #eef4ff !important;
    color: #2b6fef !important;
}

.kcfc-method-field {
    margin-bottom: 4px !important;
}

/* ---- Buttons ---- */
.kcfc-btn {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    padding: 12px 14px !important;
    margin: 16px 0 0 !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
}

.kcfc-btn-primary {
    background: #2b6fef !important;
    color: #ffffff !important;
}

.kcfc-btn-primary:hover {
    background: #1f5fe0 !important;
}

.kcfc-btn-secondary {
    background: #ffffff !important;
    border-color: #e2e5ea !important;
    color: #333333 !important;
}

.kcfc-btn-secondary:hover {
    background: #f7f8fa !important;
}

.kcfc-link-btn {
    display: block !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    color: #2b6fef !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    text-align: left !important;
}

.kcfc-link-btn:hover {
    color: #1f5fe0 !important;
    background: none !important;
    text-decoration: underline !important;
}

.kcfc-auth button:disabled,
.kcfc-otp-widget button:disabled,
.kcfc-family-page button:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    text-decoration: none !important;
}

.kcfc-auth button:disabled:hover,
.kcfc-otp-widget button:disabled:hover,
.kcfc-family-page button:disabled:hover {
    background: inherit !important;
    color: inherit !important;
}

.kcfc-back-link {
    margin-bottom: 4px !important;
}

.kcfc-hint {
    font-size: 12px !important;
    color: #8a9099 !important;
    margin: 8px 0 0 !important;
}

/* ---- Messages ---- */
.kcfc-msg {
    padding: 10px 13px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    margin-bottom: 16px !important;
    border: none !important;
}

.kcfc-msg-success {
    background: #e8f6ec !important;
    color: #1e7a37 !important;
}

.kcfc-msg-error {
    background: #fdecec !important;
    color: #b8261f !important;
}

.kcfc-already-logged-in {
    text-align: center !important;
}

/* ---- Standalone OTP widget ---- */
.kcfc-otp-widget {
    max-width: 380px !important;
    margin: 16px auto 0 !important;
    padding: 18px !important;
    border: 1px solid #e7e9ec !important;
    border-radius: 12px !important;
    background: #fafbfc !important;
}

.kcfc-otp-widget-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    margin: 0 0 10px !important;
    text-align: center !important;
}
